Learn R Programming

mclust (version 5.4.1)

emE: EM algorithm starting with E-step for a parameterized Gaussian mixture model.

Description

Implements the EM algorithm for a parameterized Gaussian mixture model, starting with the expectation step.

Usage

emE(data, parameters, prior = NULL, control = emControl(), warn = NULL, …)
emV(data, parameters, prior = NULL, control = emControl(), warn = NULL, …)
emX(data, prior = NULL, warn = NULL, …)
emEII(data, parameters, prior = NULL, control = emControl(), warn = NULL, …)
emVII(data, parameters, prior = NULL, control = emControl(), warn = NULL, …)
emEEI(data, parameters, prior = NULL, control = emControl(), warn = NULL, …)
emVEI(data, parameters, prior = NULL, control = emControl(), warn = NULL, …)
emEVI(data, parameters, prior = NULL, control = emControl(), warn = NULL, …)
emVVI(data, parameters, prior = NULL, control = emControl(), warn = NULL, …)
emEEE(data, parameters, prior = NULL, control = emControl(), warn = NULL, …)
emEEV(data, parameters, prior = NULL, control = emControl(), warn = NULL, …)
emVEV(data, parameters, prior = NULL, control = emControl(), warn = NULL, …)
emVVV(data, parameters, prior = NULL, control = emControl(), warn = NULL, …)
emEVE(data, parameters, prior = NULL, control = emControl(), warn = NULL, …)
emEVV(data, parameters, prior = NULL, control = emControl(), warn = NULL, …)
emVEE(data, parameters, prior = NULL, control = emControl(), warn = NULL, …)
emVVE(data, parameters, prior = NULL, control = emControl(), warn = NULL, …)
emXII(data, prior = NULL, warn = NULL, …)
emXXI(data, prior = NULL, warn = NULL, …)
emXXX(data, prior = NULL, warn = NULL, …)

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.

parameters

The parameters of the model:

pro

Mixing proportions for the components of the mixture. There should one more mixing proportion than the number of Gaussian components if the mixture model includes a Poisson noise term.

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.

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.

prior

The default assumes no prior, but this argument allows specification of a conjugate prior on the means and variances through the function priorControl.

control

A list of control parameters for EM. The defaults are set by the call emControl().

warn

A logical value indicating whether or not a warning should be issued whenever a singularity is encountered. The default is given in mclust.options("warn").

Catches unused arguments in indirect or list calls via do.call.

Value

A list including the following components:

modelName

A character string identifying the model (same as the input argument).

z

A matrix whose [i,k]th entry is the conditional probability of the ith observation belonging to the kth component of the mixture.

parameters

pro

A vector whose kth component is the mixing proportion for the kth component of the mixture model. If the model includes a Poisson term for noise, there should be one more mixing proportion than the number of Gaussian components.

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.

Vinv

The estimate of the reciprocal hypervolume of the data region used in the computation when the input indicates the addition of a noise component to the model.

loglik

The log likelihood for the data in the mixture model.

Attributes:

"info" Information on the iteration. "WARNING" An appropriate warning if problems are encountered in the computations.

See Also

me, mstep, mclustVariance, mclust.options.

Examples

Run this code
# NOT RUN {
msEst <- mstepEEE(data = iris[,-5], z = unmap(iris[,5]))
names(msEst)

emEEE(data = iris[,-5], parameters = msEst$parameters)
# }

Run the code above in your browser using DataLab