Learn R Programming

mclust (version 2.1-14)

estep: E-step for parameterized MVN mixture models.

Description

Implements the expectation step of EM algorithm for parameterized MVN mixture models.

Usage

estep(modelName, data, mu, ...)

Arguments

modelName
A character string indicating the model: "E": equal variance (one-dimensional) "V": variable variance (one-dimensional) "EII": spherical, equal volume "VII": spherical, unequal volume "EEI": diagonal, equal volume and shape "VEI": diagonal, varyi
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.
...
Arguments for model-specific functions. Specifically:
  • An argument describing the variance (depends on the model):[object Object],[object Object],[object Object],[object Object],The form of the variance specification is the same as for the out

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.
  • modelNameA character string identifying the model (same as the input argument).
  • 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 97:611-631. 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

estepE, ..., estepVVV, em, mstep, do.call, mclustOptions

Examples

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

msEst <- mstep(modelName = "EII", data = irisMatrix, 
               z = unmap(irisClass))
names(msEst)

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

Run the code above in your browser using DataLab