Learn R Programming

bayesm (version 1.1-2)

momMix: Compute Posterior Expectation of Normal Mixture Model Moments

Description

momMix averages the moments of a normal mixture model over MCMC draws.

Usage

momMix(probdraw, compdraw)

Arguments

probdraw
R x ncomp list of draws of mixture probs
compdraw
list of length R of draws of mixture component moments

Value

  • a list of the following items ...
  • muPosterior Expectation of Mean
  • sigmaPosterior Expecation of Covariance Matrix
  • sdPosterior Expectation of Vector of Standard Deviations
  • corrPosterior Expectation of Correlation Matrix

concept

  • mcmc
  • normal mixture
  • posterior moments

Warning

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

Details

R is the number of MCMC draws in argument list above. ncomp is the number of mixture components fitted. compdraw is a list of lists of lists with mixture components. compdraw[[i]] is ith draw. compdraw[[i]][[j]][[1]] is the mean parameter vector for the jth component, ith MCMC draw. compdraw[[i]][[j]][[2]] is the UL decomposition of $Sigma^{-1}$ for the jth component, ith MCMC draw.

References

For further discussion, see Bayesian Statistics and Marketing by Allenby, McCulloch, and Rossi, Chapter 5. http://gsbwww.uchicago.edu/fac/peter.rossi/research/bsm.html

See Also

rmixGibbs