powered by
To compute the mean values of subgroups based on a Bayesian hierarchical model.
MeanHM(x,sigma)
`theta`: population mean.
`sigma`: population standard deviation.
Numeric vector of observations for the subgroups.
hyper-parameter. to be estimated or can be given.
x1 <- rnorm(100,2,1) x2 <- rnorm(100,3,1.5) x3 <- rnorm(100,4,1.9) x <- cbind(x1,x2,x3) MeanHM(x,sigma=0.5)
Run the code above in your browser using DataLab