abc
package for more details).musigma2 loads in five R objects: par.sim is a data
frame and contains the parameter values of the simulated data sets,
stat is a data frame and contains the simulated summary
statistics, stat.obs is a data frame and contains the observed
summary statistics, post.mu and post.sigma2 are data
frames and contain the true posterior distributions for the two
parameters of interest, \(\mu\) and \(\sigma^2\), respectively.
data(musigma2)The par.sim data frame contains the following columns:
muThe population mean.
sigma2The population variance.
The stat.sim and stat.obs data frames contain the
following columns:
meanThe sample mean.
varThe logarithm of the sample variance.
The post.mu and post.sigma2 data frames contain the
following columns:
xthe coordinates of the points where the density is estimated.
ythe posterior density values.
The prior of \(\sigma^2\) is an inverse \(\chi^2\) distribution with one degree of freedom. The prior of \(\mu\) is a normal distribution with variance of \(\sigma^2\). For this simple example, the closed form of the posterior distribution is available.
Anderson, E. (1935). The irises of the Gaspe Peninsula, Bulletin of the American Iris Society, 59, 2-5.