I am reproducing Example 25 of [BAYES] bayesmh:
As a part of output, I get the summary statistics of efficiency as follows:
Checks out against the manual, which is good. Now, let me turn off the noshow() option to see all parameters at once:
Hm. The average efficiency falls by a factor of about five:
So I am not very convinced when the manual goes on to say "The average sampling efficiency is about 14% with no indications for convergence problems." Effective sample sizes are worse for the random effects (as expected, of course; it is a complicated statistic to deal with). Maybe a more honest language would be, "For the parameters presented in the table, the average sampling efficiency is about 14%. The omitted parameters (random effects) have lower efficiency. If the interest is in the random effects, e.g. for prediction purposes, more thorough sampling could be recommended."
Code:
webuse pig fvset base none id set seed 14 bayesmh weight i.id i.id#c.week, likelihood(normal({var_0})) noconstant prior({weight:i.id i.id#c.week}, mvnormal(2, {weight:_cons}, {weight:week}, {Sigma,m})) prior({weight:week _cons}, normal(0, 1e2)) prior({var_0}, igamma(0.001,0.001)) prior({Sigma,m}, iwishart(2,3,I(2))) block({var_0}, gibbs) block({Sigma,m}, gibbs) block({weight:_cons}) block({weight:week}) block({weight:i.id}, reffects) block({weight:i.id#c.week}, reffects) noshow({weight:i.id i.id#c.week}) mcmcsize(5000) dots
Code:
Efficiency: min = .07112 avg = .1423 Log marginal-likelihood = -926.22043 max = .2238
Code:
set seed 14 bayesmh weight i.id i.id#c.week, likelihood(normal({var_0})) noconstant prior({weight:i.id i.id#c.week}, mvnormal(2, {weight:_cons}, {weight:week}, {Sigma,m})) prior({weight:week _cons}, normal(0, 1e2)) prior({var_0}, igamma(0.001,0.001)) prior({Sigma,m}, iwishart(2,3,I(2))) block({var_0}, gibbs) block({Sigma,m}, gibbs) block({weight:_cons}) block({weight:week}) block({weight:i.id}, reffects) block({weight:i.id#c.week}, reffects) mcmcsize(5000) dots
Code:
Efficiency: min = .00895 avg = .02973 Log marginal-likelihood = -926.22043 max = .2238
Comment