Skip to content

Commit b333788

Browse files
committed
stan model cleanup
1 parent 8740939 commit b333788

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

knitr/car-iar-poisson/bym2.stan

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}
4646
generated quantities {
4747
real logit_rho = log(rho / (1.0 - rho));

knitr/car-iar-poisson/simple_iar.stan

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ data {
66
}
77
parameters {
88
vector[N] phi;
9-
real sigma;
109
}
1110
model {
1211
target += -0.5 * dot_self(phi[node1] - phi[node2]);

0 commit comments

Comments
 (0)