Learn R Programming

mclust (version 2.1-14)

estepE: E-step in the EM algorithm for a parameterized MVN mixture model.

Description

Implements the expectation step in the EM algorithm for a parameterized MVN mixture model.

Usage

estepE(data, mu, sigmasq, pro, eps, warnSingular, Vinv, ...)
estepV(data, mu, sigmasq, pro, eps, warnSingular, Vinv, ...)
estepEII(data, mu, sigmasq, pro, eps, warnSingular, Vinv, ...)
estepVII(data, mu, sigmasq, pro, eps, warnSingular, Vinv, ...)
estepEEI(data, mu, decomp, pro, eps, warnSingular, Vinv, ...)
estepVEI(data, mu, decomp, pro, eps, warnSingular, Vinv, ...)
estepEVI(data, mu, decomp, pro, eps, warnSingular, Vinv, ...)
estepVVI(data, mu, decomp, pro, eps, warnSingular, Vinv, ...)
estepEEE(data, mu, Sigma, pro, eps, warnSingular, Vinv, ...)
estepEEV(data, mu, decomp, pro, eps, warnSingular, Vinv, ...)
estepVEV(data, mu, decomp, pro, eps, warnSingular, Vinv, ...)
estepVVV(data, mu, sigma, pro, eps, warnSingular, Vinv, ...)

Arguments

data
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.
mu
The mean for each component. If there is more than one component, mu is a matrix whose columns are the means of the components.
sigmasq
for the one-dimensional models ("E", "V") and spherical models ("EII", "VII"). This is either a vector whose kth component is the variance for the kth component in the mixture model ("V" and "VII"), or a scalar giving the com
decomp
for the diagonal models ("EEI", "VEI", "EVI", "VVI") and some ellipsoidal models ("EEV", "VEV"). This is a list described in more detail in cdens.
sigma
for the unconstrained variance model "VVV" or the equal variance model "EEE". A d by d by G matrix array whose [,,k]th entry is the covariance matrix for the kth component of the mixture model.
Sigma
for the equal variance model "EEE". A d by d matrix giving the common covariance for all components of the mixture model.
pro
Mixing proportions for the components of the mixture. There should one more mixing proportion than the number of MVN components if the mixture model includes a Poisson noise term.
eps
A scalar tolerance for deciding when to terminate computations due to computational singularity in covariances. Smaller values of eps allow computations to proceed nearer to singularity. The default is .Mclust$eps.
warnSingular
A logical value indicating whether or not a warning should be issued whenever a singularity is encountered. The default is .Mclust$warnSingular.
Vinv
An estimate of the reciprocal hypervolume of the data region. The default is determined by applying function hypvol to the data. Used only when pro includes an additional mixing proportion for a noise component.
...
Other arguments to describe the variance, in particular decomp, sigma or cholsigma for model "VVV", decomp for models "VII" and "EII", and Sigma or cholSigma for mod

Value

  • A list including the following components:
  • zA matrix whose [i,k]th entry is the conditional probability of the ith observation belonging to the kth component of the mixture.
  • loglikThe logliklihood for the data in the mixture model.
  • modelNameCharacter string identifying the model.
  • Attribute
    • "warn": An appropriate warning if problems are encountered in the computations.

References

C. Fraley and A. E. Raftery (2002a). Model-based clustering, discriminant analysis, and density estimation. Journal of the American Statistical Association. See http://www.stat.washington.edu/mclust. C. Fraley and A. E. Raftery (2002b). MCLUST:Software for model-based clustering, density estimation and discriminant analysis. Technical Report, Department of Statistics, University of Washington. See http://www.stat.washington.edu/mclust.

Details

This function can be used with an indirect or list call using do.call, allowing the output of e.g. mstep to be passed without the need to specify individual parameters as arguments.

See Also

estep, em, mstep, do.call, mclustOptions

Examples

Run this code
data(iris)
irisMatrix <- as.matrix(iris[,1:4])
irisClass <- iris[,5]

msEst <- mstepEII(data = irisMatrix, z = unmap(irisClass))
names(msEst)

estepEII(data = irisMatrix, mu = msEst$mu, pro = msEst$pro, 
         sigmasq = msEst$sigmasq)
do.call("estepEII", c(list(data=irisMatrix), msEst)) ## alternative call

Run the code above in your browser using DataLab