-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
302 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
model-api/src/model-builder/code-blocks/prior/group-level-effects/_b0-Beta-template_
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
## on intercept parameters and other correlated coefficients for each site | ||
## within each stratum. Slopes vary by stratum. | ||
for(k in 1:y.n.strata) { | ||
|
||
mu.B0.raw[k] ~ dnorm(0, VAGUE_COEF_PRIOR_INTERCEPT) | ||
mu.B0[k] <- xi[1, k] * mu.B0.raw[k] | ||
#sigma.B0[k] ~ SIGMA_B0_PRIOR | ||
B1[k] ~ dnorm(0, VAGUE_COEF_PRIOR_SLOPE) | ||
|
||
Tau.Beta.raw[1:n.rand.slopes, 1:n.rand.slopes, k] ~ dwish(R.wish[, ], k.wish) # dmvnorm with a Wishart (dwish) prior | ||
mu.Beta.raw[1, k] <- mu.B0.raw[k] | ||
for (b in 2:n.rand.slopes) { | ||
mu.Beta.raw[b, k] ~ dnorm(0, VAGUE_COEF_PRIOR_SLOPE) | ||
} | ||
Sigma.Beta.raw[1:n.rand.slopes, 1:n.rand.slopes, k] <- | ||
inverse(Tau.Beta.raw[1:n.rand.slopes, 1:n.rand.slopes, k]) | ||
for (b in 1:n.rand.slopes) { | ||
mu.Beta[b, k] <- xi[b, k] * mu.Beta.raw[b, k] | ||
sigma.Beta[b, k] <- abs(xi[b, k]) * sqrt(Sigma.Beta.raw[b, b, k]) | ||
xi[b, k] ~ dunif(0, 100) | ||
for (b.prime in 1:n.rand.slopes) { | ||
rho.Beta[b, b.prime, k] <- Sigma.Beta.raw[b, b.prime, k] / | ||
sqrt(Sigma.Beta.raw[b, b, k] * Sigma.Beta.raw[b.prime, b.prime, k]) | ||
} | ||
} | ||
|
||
for(j in 1:y.n.site[k]) { | ||
Beta.grp.raw[j, 1:n.rand.slopes, k] ~ dmnorm(mu.Beta.raw[, k], Tau.Beta.raw[, , k]) | ||
for (b in 1:n.rand.slopes) { | ||
Beta.grp[j, b, k] <- xi[b, k] * Beta.grp.raw[j, b, k] | ||
} | ||
### Intercepts vary by site and stratum. | ||
B0[j, k] <- Beta.grp[j, 1, k] | ||
### Put coefficients into matrix form to make them compatible with | ||
### the multiple slopes model. | ||
B[j, 1, k] <- B0[j, k] | ||
B[j, 2, k] <- B1[k] | ||
} | ||
|
||
} |
36 changes: 36 additions & 0 deletions
36
...l-api/src/model-builder/code-blocks/prior/group-level-effects/_b0-Beta-template_-inv-wish
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
## on intercept parameters and other correlated coefficients for each site | ||
## within each stratum. Slopes vary by stratum. | ||
for(k in 1:y.n.strata) { | ||
|
||
mu.B0[k] ~ dnorm(0, VAGUE_COEF_PRIOR_INTERCEPT) | ||
#sigma.B0[k] ~ SIGMA_B0_PRIOR | ||
B1[k] ~ dnorm(0, VAGUE_COEF_PRIOR_SLOPE) | ||
|
||
Tau.Beta.raw[1:n.rand.slopes, 1:n.rand.slopes, k] ~ dwish(R.wish[, ], k.wish) # dmvnorm with a Wishart (dwish) prior | ||
mu.Beta[1, k] <- mu.B0[k] | ||
for (b in 2:n.rand.slopes) { | ||
mu.Beta[b, k] ~ dnorm(0, VAGUE_COEF_PRIOR_SLOPE) | ||
} | ||
Sigma.Beta[1:n.rand.slopes, 1:n.rand.slopes, k] <- | ||
inverse(Tau.Beta.raw[1:n.rand.slopes, 1:n.rand.slopes, k]) | ||
for (b in 1:n.rand.slopes) { | ||
sigma.Beta[b, k] <- sqrt(Sigma.Beta[b, b, k]) | ||
mu.Beta.raw[b, k] <- mu.Beta[b, k] # a hack | ||
xi[b, k] <- 1 # a hack | ||
for (b.prime in 1:n.rand.slopes) { | ||
rho.Beta[b, b.prime, k] <- Sigma.Beta[b, b.prime, k] / | ||
sqrt(Sigma.Beta[b, b, k] * Sigma.Beta[b.prime, b.prime, k]) | ||
} | ||
} | ||
|
||
for(j in 1:y.n.site[k]) { | ||
Beta.grp[j, 1:n.rand.slopes, k] ~ dmnorm(mu.Beta[, k], Tau.Beta.raw[, , k]) | ||
### Intercepts vary by site and stratum. | ||
B0[j, k] <- Beta.grp[j, 1, k] | ||
### Put coefficients into matrix form to make them compatible with | ||
### the multiple slopes model. | ||
B[j, 1, k] <- B0[j, k] | ||
B[j, 2, k] <- B1[k] | ||
} | ||
|
||
} |
40 changes: 40 additions & 0 deletions
40
...rc/model-builder/code-blocks/prior/group-level-effects/_b0-Beta-template_-scaled-inv-wish
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
## on intercept parameters and other correlated coefficients for each site | ||
## within each stratum. Slopes vary by stratum. | ||
for(k in 1:y.n.strata) { | ||
|
||
mu.B0.raw[k] ~ dnorm(0, 1 / 100^2) # VAGUE_COEF_PRIOR_INTERCEPT | ||
mu.B0[k] <- xi[1, k] * mu.B0.raw[k] | ||
#sigma.B0[k] ~ SIGMA_B0_PRIOR | ||
B1[k] ~ dnorm(0, 1 / 100^2) # VAGUE_COEF_PRIOR_SLOPE | ||
|
||
Tau.Beta.raw[1:n.rand.slopes, 1:n.rand.slopes, k] ~ dwish(R.wish[, ], k.wish) # dmvnorm with a Wishart (dwish) prior | ||
mu.Beta.raw[1, k] <- mu.B0.raw[k] | ||
for (b in 2:n.rand.slopes) { | ||
mu.Beta.raw[b, k] ~ dnorm(0, 1 / 100^2) # VAGUE_COEF_PRIOR_SLOPE | ||
} | ||
Sigma.Beta.raw[1:n.rand.slopes, 1:n.rand.slopes, k] <- | ||
inverse(Tau.Beta.raw[1:n.rand.slopes, 1:n.rand.slopes, k]) | ||
for (b in 1:n.rand.slopes) { | ||
mu.Beta[b, k] <- xi[b, k] * mu.Beta.raw[b, k] | ||
sigma.Beta[b, k] <- abs(xi[b, k]) * sqrt(Sigma.Beta.raw[b, b, k]) | ||
xi[b, k] ~ dunif(0, 100) | ||
for (b.prime in 1:n.rand.slopes) { | ||
rho.Beta[b, b.prime, k] <- Sigma.Beta.raw[b, b.prime, k] / | ||
sqrt(Sigma.Beta.raw[b, b, k] * Sigma.Beta.raw[b.prime, b.prime, k]) | ||
} | ||
} | ||
|
||
for(j in 1:y.n.site[k]) { | ||
Beta.grp.raw[j, 1:n.rand.slopes, k] ~ dmnorm(mu.Beta.raw[, k], Tau.Beta.raw[, , k]) | ||
for (b in 1:n.rand.slopes) { | ||
Beta.grp[j, b, k] <- xi[b, k] * Beta.grp.raw[j, b, k] | ||
} | ||
### Intercepts vary by site and stratum. | ||
B0[j, k] <- Beta.grp[j, 1, k] | ||
### Put coefficients into matrix form to make them compatible with | ||
### the multiple slopes model. | ||
B[j, 1, k] <- B0[j, k] | ||
B[j, 2, k] <- B1[k] | ||
} | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
model-api/src/model-builder/code-blocks/prior/group-level-effects/_b0-b1-template-g-drop_
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
## on slope and intercept parameters and their covariance matrix for each | ||
## site within each stratum. | ||
for(k in 1:y.n.strata) { | ||
for(j in 1:y.n.site[k]) { | ||
B[j, 1:2, k] ~ dmnorm(B.hat[j, 1:2, k], Tau.B[, 1:2, k]) | ||
B.hat[j, 1, k] <- mu.B0[k] | ||
B.hat[j, 2, k] <- mu.B1[k] | ||
} | ||
mu.B0[k] ~ dnorm(0, VAGUE_COEF_PRIOR_INTERCEPT) | ||
mu.B1[k] ~ dnorm(0, VAGUE_COEF_PRIOR_SLOPE) | ||
Tau.B[1:2, 1:2, k] <- inverse(Sigma.B[1:2, 1:2, k]) | ||
Sigma.B[1, 1, k] <- sigma.B0[k]^2 | ||
sigma.B0[k] ~ SIGMA_B0_PRIOR | ||
Sigma.B[2, 2, k] <- sigma.B1[k]^2 | ||
sigma.B1[k] ~ SIGMA_B1_PRIOR | ||
Sigma.B[1, 2, k] <- rho[k] * sigma.B0[k] * sigma.B1[k] | ||
Sigma.B[2, 1, k] <- Sigma.B[1, 2, k] | ||
rho[k] ~ dunif(-1, 1) | ||
} |
23 changes: 23 additions & 0 deletions
23
model-api/src/model-builder/code-blocks/prior/group-level-effects/_b0-b1-template-nc_
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
## on slope and intercept parameters and their covariance matrix for each | ||
## site within each stratum. # TODO | ||
for(k in 1:y.n.strata) { | ||
for(j in 1:y.n.site[k]) { | ||
z.unit.corr[j, 1:2, k] ~ dmnorm(B.hat[j, 1:2, k], Tau.Omega.B[, 1:2, k]) | ||
B.hat[j, 1, k] <- 0 | ||
B.hat[j, 2, k] <- 0 | ||
B0[j, k] <- mu.B0[k] + z.unit.corr[j, 1, k] * sigma.B0[k] | ||
B1[j, k] <- mu.B1[k] + z.unit.corr[j, 2, k] * sigma.B1[k] | ||
B[j, 1, k] <- B0[j, k] | ||
B[j, 2, k] <- B1[j, k] | ||
} | ||
mu.B0[k] ~ dnorm(0, VAGUE_COEF_PRIOR_INTERCEPT) | ||
mu.B1[k] ~ dnorm(0, VAGUE_COEF_PRIOR_SLOPE) | ||
Tau.Omega.B[1:2, 1:2, k] <- inverse(Omega.B[1:2, 1:2, k]) | ||
Omega.B[1, 1, k] <- 1 | ||
sigma.B0[k] ~ dt(0, 1/(VAGUE_VAR_PRIOR_UL^2), 1) T(0,) | ||
Omega.B[2, 2, k] <- 1 | ||
sigma.B1[k] ~ dt(0, 1/(VAGUE_VAR_PRIOR_UL^2), 1) T(0,) | ||
Omega.B[1, 2, k] <- rho[k] | ||
Omega.B[2, 1, k] <- Omega.B[1, 2, k] | ||
rho[k] ~ dunif(-1, 1) | ||
} |
19 changes: 19 additions & 0 deletions
19
model-api/src/model-builder/code-blocks/prior/group-level-effects/_b0-b1-template_
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
## on slope and intercept parameters and their covariance matrix for each | ||
## site within each stratum. | ||
for(k in 1:y.n.strata) { | ||
for(j in 1:y.n.site[k]) { | ||
B[j, 1:2, k] ~ dmnorm(B.hat[j, 1:2, k], Tau.B[, 1:2, k]) | ||
B.hat[j, 1, k] <- mu.B0[k] | ||
B.hat[j, 2, k] <- mu.B1[k] | ||
} | ||
mu.B0[k] ~ dnorm(0, VAGUE_COEF_PRIOR_INTERCEPT) | ||
mu.B1[k] ~ dnorm(0, VAGUE_COEF_PRIOR_SLOPE) | ||
Tau.B[1:2, 1:2, k] <- inverse(Sigma.B[1:2, 1:2, k]) | ||
Sigma.B[1, 1, k] <- sigma.B0[k]^2 | ||
sigma.B0[k] ~ SIGMA_B0_PRIOR | ||
Sigma.B[2, 2, k] <- sigma.B1[k]^2 | ||
sigma.B1[k] ~ SIGMA_B1_PRIOR | ||
Sigma.B[1, 2, k] <- rho[k] * sigma.B0[k] * sigma.B1[k] | ||
Sigma.B[2, 1, k] <- Sigma.B[1, 2, k] | ||
rho[k] ~ dunif(-1, 1) | ||
} |
14 changes: 14 additions & 0 deletions
14
model-api/src/model-builder/code-blocks/prior/group-level-effects/_b0-template-b-drop_
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
## on intercept parameters for each site within each stratum. Slopes vary by | ||
## stratum. | ||
for(k in 1:y.n.strata) { | ||
mu.B0[k] ~ dnorm(0, VAGUE_COEF_PRIOR_INTERCEPT) | ||
sigma.B0[k] ~ SIGMA_B0_PRIOR | ||
tau.B0[k] <- 1 / sigma.B0[k]^2 | ||
for(j in 1:y.n.site[k]) { | ||
### Intercepts vary by site and stratum. | ||
B0[j, k] ~ dnorm(mu.B0[k], tau.B0[k]) | ||
### Put coefficients into matrix form to make them compatible with | ||
### the multiple slopes model. | ||
B[j, 1, k] <- B0[j, k] | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...api/src/model-builder/code-blocks/prior/group-level-effects/_b0-template-b-drop_-fixed-b0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## on intercept parameters for each site within each stratum. Slopes vary by | ||
## stratum. | ||
for(k in 1:y.n.strata) { | ||
mu.B0[k] ~ dnorm(0, VAGUE_COEF_PRIOR_INTERCEPT) | ||
for(j in 1:y.n.site[k]) { | ||
### Intercepts vary by site and stratum. | ||
B0[j, k] <- mu.B0[k] | ||
### Put coefficients into matrix form to make them compatible with | ||
### the multiple slopes model. | ||
B[j, 1, k] <- B0[j, k] | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
model-api/src/model-builder/code-blocks/prior/group-level-effects/_b0-template-bg-drop_
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
## on intercept parameters for each site within each stratum. Slopes vary by | ||
## stratum. | ||
for(k in 1:y.n.strata) { | ||
mu.B0[k] ~ dnorm(0, VAGUE_COEF_PRIOR_INTERCEPT) | ||
sigma.B0[k] ~ SIGMA_B0_PRIOR | ||
tau.B0[k] <- 1 / sigma.B0[k]^2 | ||
for(j in 1:y.n.site[k]) { | ||
### Intercepts vary by site and stratum. | ||
B0[j, k] ~ dnorm(mu.B0[k], tau.B0[k]) | ||
### Put coefficients into matrix form to make them compatible with | ||
### the multiple slopes model. | ||
B[j, 1, k] <- B0[j, k] | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...pi/src/model-builder/code-blocks/prior/group-level-effects/_b0-template-bg-drop_-fixed-b0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## on intercept parameters for each site within each stratum. Slopes vary by | ||
## stratum. | ||
for(k in 1:y.n.strata) { | ||
mu.B0[k] ~ dnorm(0, VAGUE_COEF_PRIOR_INTERCEPT) | ||
for(j in 1:y.n.site[k]) { | ||
### Intercepts vary by site and stratum. | ||
B0[j, k] <- mu.B0[k] | ||
### Put coefficients into matrix form to make them compatible with | ||
### the multiple slopes model. | ||
B[j, 1, k] <- B0[j, k] | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
model-api/src/model-builder/code-blocks/prior/group-level-effects/_b0-template-g-drop_
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
## on intercept parameters for each site within each stratum. Slopes vary by | ||
## stratum. | ||
for(k in 1:y.n.strata) { | ||
mu.B0[k] ~ dnorm(0, VAGUE_COEF_PRIOR_INTERCEPT) | ||
sigma.B0[k] ~ SIGMA_B0_PRIOR | ||
tau.B0[k] <- 1 / sigma.B0[k]^2 | ||
B1[k] ~ dnorm(0, VAGUE_COEF_PRIOR_SLOPE) | ||
for(j in 1:y.n.site[k]) { | ||
### Intercepts vary by site and stratum. | ||
B0[j, k] ~ dnorm(mu.B0[k], tau.B0[k]) | ||
### Put coefficients into matrix form to make them compatible with | ||
### the multiple slopes model. | ||
B[j, 1, k] <- B0[j, k] | ||
B[j, 2, k] <- B1[k] | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...api/src/model-builder/code-blocks/prior/group-level-effects/_b0-template-g-drop_-fixed-b0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## on intercept parameters for each site within each stratum. Slopes vary by | ||
## stratum. | ||
for(k in 1:y.n.strata) { | ||
mu.B0[k] ~ dnorm(0, VAGUE_COEF_PRIOR_INTERCEPT) | ||
for(j in 1:y.n.site[k]) { | ||
### Intercepts vary by site and stratum. | ||
B0[j, k] <- mu.B0[k] | ||
### Put coefficients into matrix form to make them compatible with | ||
### the multiple slopes model. | ||
B[j, 1, k] <- B0[j, k] | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
model-api/src/model-builder/code-blocks/prior/group-level-effects/_b0-template-nc_
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
## on intercept parameters for each site within each stratum. Slopes vary by | ||
## stratum. | ||
for(k in 1:y.n.strata) { | ||
mu.B0[k] ~ dnorm(0, VAGUE_COEF_PRIOR_INTERCEPT) | ||
sigma.B0[k] ~ dt(0, 1/(VAGUE_VAR_PRIOR_UL^2), 1) T(0,) # implies half-cauchy with scale of VAGUE_VAR_PRIOR_UL | ||
tau.B0[k] <- 1 / sigma.B0[k]^2 | ||
B1[k] ~ dnorm(0, VAGUE_COEF_PRIOR_SLOPE) | ||
for(j in 1:y.n.site[k]) { | ||
### Intercepts vary by site and stratum. | ||
B0.offset[j, k] ~ dnorm(0, 1) | ||
B0[j, k] <- mu.B0[k] + B0.offset[j, k] * sigma.B0[k] | ||
### Put coefficients into matrix form to make them compatible with | ||
### the multiple slopes model. | ||
B[j, 1, k] <- B0[j, k] | ||
B[j, 2, k] <- B1[k] | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
model-api/src/model-builder/code-blocks/prior/group-level-effects/_b0-template_
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
## on intercept parameters for each site within each stratum. Slopes vary by | ||
## stratum. | ||
for(k in 1:y.n.strata) { | ||
mu.B0[k] ~ dnorm(0, VAGUE_COEF_PRIOR_INTERCEPT) | ||
sigma.B0[k] ~ SIGMA_B0_PRIOR | ||
tau.B0[k] <- 1 / sigma.B0[k]^2 | ||
B1[k] ~ dnorm(0, VAGUE_COEF_PRIOR_SLOPE) | ||
for(j in 1:y.n.site[k]) { | ||
### Intercepts vary by site and stratum. | ||
B0[j, k] ~ dnorm(mu.B0[k], tau.B0[k]) | ||
### Put coefficients into matrix form to make them compatible with | ||
### the multiple slopes model. | ||
B[j, 1, k] <- B0[j, k] | ||
B[j, 2, k] <- B1[k] | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
model-api/src/model-builder/code-blocks/prior/group-level-effects/_no-gle-template_
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## on intercept parameters for each site within each stratum. Slopes vary by | ||
## stratum. | ||
for(k in 1:y.n.strata) { | ||
B0[k] ~ dnorm(0, VAGUE_COEF_PRIOR_INTERCEPT) | ||
B1[k] ~ dnorm(0, VAGUE_COEF_PRIOR_SLOPE) | ||
for(j in 1:y.n.site[k]) { | ||
### Put coefficients into matrix form to make them compatible with | ||
### the multiple slopes model. | ||
B[j, 1, k] <- B0[k] | ||
B[j, 2, k] <- B1[k] | ||
} | ||
} |