## (solution) Hi, the original question is attached below. The following is the

Hi, the original question is attached below. The following is the statement I wrote on OpenBUGS, but when I set the initial values on OpenBUGS, as below:

initial value

list(psi0=500, tausq0=0.001)

list(psi0=100, tausq0=1)

list(psi0=0, tausq0=0.00001)

I got "initial values loaded but chain contains uninitialized variables". How should I solve this problem? After this step, how should I proceed the question c and d? Any advise for step on OpenBUGS?

Thanks very much for help!

PS:

model

{

for(i in 1:n){

psihat[i] ~ dnorm(psi[i], tausq[i])

psi[i] ~ dnorm(psi0, tausq0)

tausq[i] <- 1 / pow(sigma[i],2)

}

psi0 ~ dflat()

tausq0 ~ dgamma(0.001, 0.001)

sigmasq0 }

list(

n=12,

psihat = c(1.055, -0.097, 0.626, 0.017, 1.068, -0.025, -0.117, -0.381, 0.507, 0.000, 0.385, 0.405),

sigma = c(0.373, 0.116, 0.229, 0.117, 0.471, 0.120, 0.220, 0.239, 0.186, 0.328, 0.206, 0.254)

)

list(psi0=500, tausq0=0.001)

list(psi0=100, tausq0=1)

list(psi0=0, tausq0=0.00001)

Solution details:

STATUS

QUALITY

Approved

Sep 13, 2020

EXPERT

Tutor