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

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

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 Σ^{-1} for the jth component, ith MCMC draw

Value

A list containing:

mu

posterior expectation of mean

sigma

posterior expectation of covariance matrix

sd

posterior expectation of vector of standard deviations

corr

posterior expectation of correlation matrix

Warning

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

Author(s)

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.