Computes component densities for points in a parameterized MVN mixture model.
cdensE(data, logarithm = FALSE, parameters, warn = NULL, …)
cdensV(data, logarithm = FALSE, parameters, warn = NULL, …)
cdensX(data, logarithm = FALSE, parameters, warn = NULL, …)
cdensEII(data, logarithm = FALSE, parameters, warn = NULL, …)
cdensVII(data, logarithm = FALSE, parameters, warn = NULL, …)
cdensEEI(data, logarithm = FALSE, parameters, warn = NULL, …)
cdensVEI(data, logarithm = FALSE, parameters, warn = NULL, …)
cdensEVI(data, logarithm = FALSE, parameters, warn = NULL, …)
cdensVVI(data, logarithm = FALSE, parameters, warn = NULL, …)
cdensEEE(data, logarithm = FALSE, parameters, warn = NULL, …)
cdensEEV(data, logarithm = FALSE, parameters, warn = NULL, …)
cdensVEV(data, logarithm = FALSE, parameters, warn = NULL, …)
cdensVVV(data, logarithm = FALSE, parameters, warn = NULL, …)
cdensEVE(data, logarithm = FALSE, parameters, warn = NULL, …)
cdensEVV(data, logarithm = FALSE, parameters, warn = NULL, …)
cdensVEE(data, logarithm = FALSE, parameters, warn = NULL, …)
cdensVVE(data, logarithm = FALSE, parameters, warn = NULL, …)
cdensXII(data, logarithm = FALSE, parameters, warn = NULL, …)
cdensXXI(data, logarithm = FALSE, parameters, warn = NULL, …)
cdensXXX(data, logarithm = FALSE, parameters, warn = NULL, …)
A numeric vector, matrix, or data frame of observations. Categorical variables are not allowed. If a matrix or data frame, rows correspond to observations and columns correspond to variables.
A logical value indicating whether or not the logarithm of the component densities should be returned. The default is to return the component densities, obtained from the log component densities by exponentiation.
The parameters of the model:
mean
The mean for each component. If there is more than one component, this is a matrix whose kth column is the mean of the kth component of the mixture model.
variance
A list of variance parameters for the model.
The components of this list depend on the model
specification. See the help file for mclustVariance
for details.
pro
Mixing proportions for the components of the mixture. If the model includes a Poisson term for noise, there should be one more mixing proportion than the number of Gaussian components.
A logical value indicating whether or not a warning should be issued
when computations fail. The default is warn=FALSE
.
Catches unused arguments in indirect or list calls via do.call
.
A numeric matrix whose [i,j]
th
entry is the density of observation i in component j.
The densities are not scaled by mixing proportions.
C. Fraley and A. E. Raftery (2002). Model-based clustering, discriminant analysis, and density estimation. Journal of the American Statistical Association 97:611-631.
C. Fraley, A. E. Raftery, T. B. Murphy and L. Scrucca (2012). mclust Version 4 for R: Normal Mixture Modeling for Model-Based Clustering, Classification, and Density Estimation. Technical Report No. 597, Department of Statistics, University of Washington.
cdens
,
dens
,
mclustVariance
,
mstep
,
mclust.options
,
do.call
.
# NOT RUN {
z2 <- unmap(hclass(hcVVV(faithful),2)) # initial value for 2 class case
model <- meVVV(data=faithful, z=z2)
cdensVVV(data=faithful, logarithm = TRUE, parameters = model$parameters)
data(cross)
z2 <- unmap(cross[,1])
model <- meEEV(data = cross[,-1], z = z2)
EEVdensities <- cdensEEV( data = cross[,-1], parameters = model$parameters)
cbind(cross[,-1],map(EEVdensities))
# }
Run the code above in your browser using DataLab