File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -34,14 +34,14 @@ model {
3434
3535 // This is the prior for phi! (up to proportionality)
3636 target += - 0.5 * dot_self( phi[node1] - phi[node2]);
37+ // soft sum-to-zero constraint on phi
38+ sum( phi) ~ normal (0 , 0.001 * N); // equivalent to mean(phi) ~ normal(0,0.001)
3739
3840 beta0 ~ normal (0.0 , 1.0 );
3941 betas ~ normal (0.0 , 1.0 );
4042 theta ~ normal (0.0 , 1.0 );
4143 sigma ~ normal (0 , 1.0 );
4244 rho ~ beta (0.5 , 0.5 );
43- // soft sum-to-zero constraint on phi)
44- sum( phi) ~ normal (0 , 0.001 * N); // equivalent to mean(phi) ~ normal(0,0.001)
4545}
4646generated quantities {
4747 real logit_rho = log( rho / (1.0 - rho));
Original file line number Diff line number Diff line change 66}
77parameters {
88 vector [N] phi;
9- real sigma;
109}
1110model {
1211 target += - 0.5 * dot_self( phi[node1] - phi[node2]);
You can’t perform that action at this time.
0 commit comments