Learn R Programming

prome (version 1.9.1.0)

MeanHM: Bayesian Hierarchical Model for Information Borrowing for Means

Description

To compute the mean values of subgroups based on a Bayesian hierarchical model.

Usage

MeanHM(x,sigma)

Value

  • `theta`: population mean.

  • `sigma`: population standard deviation.

Arguments

x

Numeric vector of observations for the subgroups.

sigma

hyper-parameter. to be estimated or can be given.

Examples

Run this code
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