Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

hiergibbs

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)

LearnBayes

Functions for Learning Bayesian Inference

v2.15.1
GPL (>= 2)
Authors
Jim Albert
Initial release
2018-03-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.