Gibbs sampling for a hierarchical regression model
Implements Gibbs sampling for estimating a two-way table of means under a hierarchical regression model.
hiergibbs(data,m)
data |
data matrix with columns observed sample means, sample sizes, and values of two covariates |
m |
number of cycles of Gibbs sampling |
beta |
matrix of simulated values of regression vector |
mu |
matrix of simulated values of cell means |
var |
vector of simulated values of second-stage prior variance |
Jim Albert
data(iowagpa) m=1000 s=hiergibbs(iowagpa,m)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.