eMixMargDen
assumes that a multivariate mixture of normals has been fitted
via MCMC (using rnmixGibbs
). For each MCMC draw, eMixMargDen
computes
the marginal densities for each component in the multivariate mixture on a user-supplied
grid and then averages over the MCMC draws.
eMixMargDen(grid, probdraw, compdraw)
An array of the same dimension as grid
with density values.
array of grid points, grid[,i]
are ordinates for i
th dimension of the density
array where each row contains a draw of probabilities of the mixture component
list of lists of draws of mixture component moments
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, Anderson School, UCLA, perossichi@gmail.com.
length(compdraw) | is the number of MCMC draws. |
compdraw[[i]] | is a list draws of mu and of the inverse Cholesky root for each of mixture components. |
compdraw[[i]][[j]] | is j th component. |
compdraw[[i]][[j]]$mu | is mean vector. |
compdraw[[i]][[j]]$rooti | is the UL decomp of \(\Sigma^{-1}\). |
For further discussion, see Bayesian Statistics and Marketingby Rossi, Allenby, and McCulloch.
rnmixGibbs