Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2008/iii/paper-44/3/g/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 , 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 , and line (3) does the same for the standard deviation on the log-variance scale. The broad bounded priors on and 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.

New to topics? Read the docs here!