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

rmixGibbs

Gibbs Sampler for Normal Mixtures w/o Error Checking


Description

rmixGibbs makes one draw using the Gibbs Sampler for a mixture of multivariate normals. rmixGibbs is not designed to be called directly. Instead, use rnmixGibbs wrapper function.

Usage

rmixGibbs(y, Bbar, A, nu, V, a, p, z)

Arguments

y

data array where rows are obs

Bbar

prior mean for mean vector of each norm comp

A

prior precision parameter

nu

prior d.f. parm

V

prior location matrix for covariance prior

a

Dirichlet prior parms

p

prior prob of each mixture component

z

component identities for each observation – "indicators"

Value

a list containing:

p

draw of mixture probabilities

z

draw of indicators of each component

comps

new draw of normal component parameters

Warning

This routine is a utility routine that does not check the input arguments for proper dimensions and type.

Author(s)

Rob McCulloch (Arizona State University) and Peter Rossi (Anderson School, UCLA), perossichi@gmail.com.

References

For further discussion, see Chapter 5 Bayesian Statistics and Marketing by Rossi, Allenby, and McCulloch.
http://www.perossi.org/home/bsm-1

See Also


bayesm

Bayesian Inference for Marketing/Micro-Econometrics

v3.1-4
GPL (>= 2)
Authors
Peter Rossi <perossichi@gmail.com>
Initial release
2019-10-14

We don't support your browser anymore

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