//sporcle.stan data { int N; //Num countries int C; //Num continents real y[N]; //Response vector[N] p; //log-Population matrix[N,C] X; //Continent } parameters { //real intercept; real beta_population; vector[C] beta_continent; real sigma; real nu; } transformed parameters { vector[N] theta; theta = beta_population * p + X*beta_continent; } model{ nu ~ gamma(2,0.1); sigma ~ cauchy(0,3); beta_population ~ normal(0,100); beta_continent ~ normal(0,100); y ~ student_t(nu,theta,sigma); }