Computes density values for data from a mixture of multivariate Gaussian distributions with parameters based on the way models are specified and parameters are stored in package mclust.
mixdens(modelName,data,parameters)
Vector of density values for the observations.
an mclust model name.
See mclustModelNames
.
data matrix; density values are computed for every observation (row).
parameters of Gaussian mixture in the format used in
the output of summary.mclustBIC
.
Christian Hennig christian.hennig@unibo.it https://www.unibo.it/sitoweb/christian.hennig/en/
set.seed(98765)
require(mclust)
iriss <- iris[sample(150,20),-5]
irisBIC <- mclustBIC(iriss)
siris <- summary(irisBIC,iriss)
round(mixdens(siris$modelName,iriss,siris$parameters),digits=2)
Run the code above in your browser using DataLab