Solution (source code)

= Solution

The <hierarchical Bayesian model> separates variability between individuals from variability between repeated measurements on an individual. In <WinBUGS>, `dnorm` takes a <precision parameter>, so inverse variance is the appropriate second argument.

Line (1) gives $\log\sigma_j^2\sim N(\phi,\psi^2)$, hence a positive <log-normal distribution> for each within-individual variance. Estimating the shared parameters supplies <partial pooling> of these variances without forcing them equal. Line (2) assigns a proper bounded flat prior to the between-individual standard deviation $\tau$, and line (3) does the same for the standard deviation $\psi$ on the log-variance scale. The broad bounded priors on $\mu$ and $\phi$ are also proper.

This is a reasonable structure for heterogeneous repeated measurements, but flat does not mean uninformative on all transformed scales. The bounds must be wide enough for plausible values, while such enormous ranges can put substantial mass on implausible predictions. Use <prior predictive checks> and sensitivity analysis, and check the <Markov chain Monte Carlo convergence diagnostics>. Serial dependence or systematic trends would require an extension of the independent-measurement likelihood.