R: Gibbs sampling for a hierarchical regression model

hiergibbs {LearnBayes} | R Documentation

## Gibbs sampling for a hierarchical regression model

### Description

Implements Gibbs sampling for estimating a two-way table of means under a hierarchical regression model.

### Usage

    hiergibbs(data,m)

### Arguments

`data` | data matrix with columns observed sample means, sample sizes, and values of two covariates
`m` | number of cycles of Gibbs sampling

### Value

`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

### Author(s)

Jim Albert

### Examples

    data(iowagpa)
    m=1000
    s=hiergibbs(iowagpa,m)

[Package LearnBayes version 2.15 Index]