Consider a hierarchical Bayesian model for a univariate normal distribution (mathrm{N}left(mu, sigma^{2} ight)) in which the mean

Question:

Consider a hierarchical Bayesian model for a univariate normal distribution \(\mathrm{N}\left(\mu, \sigma^{2}\right)\) in which the mean \(\mu\) is a realization of a normal random variable \(M\) and \(\sigma^{2}\) is a scaled realization of a random variable \(\Sigma^{2}\) that has an inverted chi-squared distribution with \(u_{0}\) degrees of freedom. (For the scaling factor \(\sigma_{0}^{2}\), this means that \(1 /\left(\sigma_{0}^{2} \Sigma^{2}\right)\) has a chi-squared distribution.) Now, given \(\Sigma^{2}=\sigma^{2}\), assume that \(M\) has a conditional normal distribution with mean \(\mu_{0}\) and variance \(\sigma^{2} / \kappa_{0}\).

(a) Draw a directed acyclic graph that describes this model. Identify each variable with the corresponding variable in the DAG.

(b) Choose \(\mu\) and \(\sigma^{2}\) (say, 100 and 100) and generate 100 pseudorandom variates from a \(\mathrm{N}\left(\mu, \sigma^{2}\right)\) distribution.
Now set up the Bayesian formulation with chosen values of \(\mu_{0}\), \(\sigma_{0}^{2}\), and \(\kappa_{0}\) (say, 90, 90, and 1), and analyze the data. (In the Bayesian sense, that means to develop posterior distributions for \(\mu\) and \(\sigma^{2}\), given the simulated data.)
It is suggested that you use R and BUGS/JAGS (with rjags) to do this analysis. The JAGS executable program must be installed in a directory accessible by \(\mathrm{R}\). It is available from SourceForge.

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: