March 2019
Beginner to intermediate
448 pages
13h 14m
English
In the following example, we will load the house price dataset that we used in the previous recipe, and we will study how different priors impact the results:
data = read.csv("./house_prices.csv")model ="data {real y[125];real x[125,6];}parameters {real beta[6];real sigma;real alpha;}model {beta[1] ~ uniform(0,1000);for (n in 1:125)y[n] ~ normal(alpha + beta[1]*x[n,1] + beta[2]*x[n,2] + beta[3]*x[n,3] + beta[4]*x[n,4] + ...Read now
Unlock full access