code=nimbleCode({
for (n in 1:N) {
for (i in 1:I) {
logit(prob[n, i]) <- beta[i] + delta[i] * prod(w[n, i])
y[n, i] ~ dbern(prob[n, i])
logT[n, i] ~ dnorm(zeta[i] + theta[n], den_epsilon[i])
}}
for (n in 1:N) {theta[n] ~ dnorm(0,1)}
for (i in 1:I) {
item_parameter[i, 1:3] ~ dmnorm(item_mu[1:3], item_den[1:3, 1:3])
beta[i] <- item_parameter[i, 1]
delta[i] <- item_parameter[i, 2]
zeta[i] <- item_parameter[i, 3]
den_epsilon[i] ~ dgamma(1, 1)
}
item_mu[1] ~ dnorm(0, 1)
item_mu[2] ~ T(dnorm(0, 1),0,)
item_mu[3] ~ dnorm(0,1)
item_den[1:3, 1:3] ~ dwish(R[1:3, 1:3], 3)
})
data <- list(y=y, logT=logT)
monitors=c("beta","delta","zeta"," den_epsilon","y","logT")
--
You received this message because you are subscribed to the Google Groups "nimble-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nimble-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/16617ee3-e387-47af-a4c1-84e1da0a8d6cn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/50bbe2a4-edf7-4d8a-b59f-a596b904ea2cn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/e262efeb-50f4-4def-859f-c39c3d20cfb9n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/226a58a0-3ea3-4ac3-b2e8-ffc3de2f139en%40googlegroups.com.