momMix
averages the moments of a normal mixture model over MCMC draws.
momMix(probdraw, compdraw)
A list containing:
posterior expectation of mean
posterior expectation of covariance matrix
posterior expectation of vector of standard deviations
posterior expectation of correlation matrix
\(R x ncomp\) list of draws of mixture probs
list of length \(R\) of draws of mixture component moments
This routine is a utility routine that does not check the input arguments for proper dimensions and type.
Peter Rossi, Anderson School, UCLA, perossichi@gmail.com.
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 \(i\)th draw. |
compdraw[[i]][[j]][[1]] | is the mean parameter vector for the \(j\)th component, \(i\)th MCMC draw. |
compdraw[[i]][[j]][[2]] | is the UL decomposition of \(\Sigma^{-1}\) for the \(j\)th component, \(i\)th MCMC draw |
For further discussion, see Chapter 5, Bayesian Statistics and Marketing by Rossi, Allenby, and McCulloch.
rmixGibbs