randomeff {mcsm} | R Documentation |
This function describes a Gibbs sampler for the one-way random effect model for the Energy
dataset provided with the mcsm
package. The prior is made of conjugate distributions,
i.e. normal and inverted gamma distributions.
randomeff(nsim = 10^3, a = 10, b = 30)
nsim |
Number of Gibbs iterations |
a |
Common shape parameter for the inverted variances |
b |
Common scale parameter for the inverted variances |
This function produces a plot made of six histograms corresponding to the six parameters of the model mu, theta1, theta2, sqrt(sigma2mu), sqrt(tau2), and sqrt(sigma2), eliminating the first $10%$ of the simulations as burnin.
Christian P. Robert and George Casella
Chapter 7 of EnteR Monte Carlo Statistical Methods
data(Energy) randomeff(10^4,a=1,b=1)