rmixGibbs
makes one draw using the Gibbs Sampler for a mixture of multivariate normals.
rmixGibbs(y, Bbar, A, nu, V, a, p, z)
data array - rows are obs
prior mean for mean vector of each norm comp
prior precision parameter
prior d.f. parm
prior location matrix for covariance priro
Dirichlet prior parms
prior prob of each mixture component
component identities for each observation -- "indicators"
a list containing:
draw mixture probabilities
draw of indicators of each component
new draw of normal component parameters
This routine is a utility routine that does not check the input arguments for proper dimensions and type.
rmixGibbs
is not designed to be called directly. Instead, use rnmixGibbs
wrapper function.
For further discussion, see Bayesian Statistics and Marketing by Allenby, McCulloch, and Rossi, Chapter 5. http://www.perossi.org/home/bsm-1