Hi

I have hierarchical model

first level

data are y_i~ Normal (alpha_i,   S_i2 )

where y_i , S_i2 are known.

second level

alpha_i~Normal(alpha, tau2)

third level

priors of alpha and tau are

alpha~ Normal(0,10000)

tau ~ halfNormal (0,100),  tau > 0

I used Metropolis within Gibbs sampler

I use normal distribution as proposal distribution cantered around current value of tau and different values of standard deviation and I choose candidate value that is greater than zero.

The problem with acceptance rate is very low and when I choose smaller values of proposal standard deviation I get good acceptance rate but the mixing of chain is very bad.

I have attached pdf file  that has more detail and contains my code.

I do not know if my code is not right or there is another thing wrong?

Thank you

More Zainab Al-kaabawi's questions See All
Similar questions and discussions