| eMixMargDen(bayesm) | R Documentation |
eMixMargDen assumes that a multivariate mixture of normals has been fitted
via MCMC (using rnmixGibbs). For each MCMC draw, the marginal densities
for each component in the multivariate mixture are computed on a user-supplied
grid and then averaged over draws.
eMixMargDen(grid, probdraw, compdraw)
grid |
array of grid points, grid[,i] are ordinates for ith component |
probdraw |
array - each row of which contains a draw of probabilities of mixture comp |
compdraw |
list of lists of draws of mixture comp moments |
length(compdraw) is number of MCMC draws.
compdraw[[i]] is a list draws of mu and inv Chol root for each of mixture components.
compdraw[[i]][[j]] is jth component. compdraw[[i]][[j]]$mu is mean vector; compdraw[[i]][[j]]$rooti
is the UL decomp of Sigma^-1.
an array of the same dimension as grid with density values.
This routine is a utility routine that does not check the
input arguments for proper dimensions and type. To avoid errors, call with
output from rnmixGibbs.
Peter Rossi, Graduate School of Business, University of Chicago, Peter.Rossi@ChicagoGsb.edu.
For further discussion, see Bayesian Statistics and Marketing
by Allenby, McCulloch, and Rossi.
http://gsbwww.uchicago.edu/fac/peter.rossi/research/bsm.html