me.weighted {mclust} | R Documentation |
EM algorithm with weights starting with M-step for parameterized Gaussian mixture models
Description
Implements the EM algorithm for fitting Gaussian mixture models parameterized by eigenvalue decomposition, when observations have weights, starting with the maximization step.
Usage
me.weighted(data, modelName, z, weights = NULL, prior = NULL,
control = emControl(), Vinv = 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. |
modelName |
A character string indicating the model. The help file for
|
z |
A matrix whose |
weights |
A vector of positive weights, where the |
prior |
Specification of a conjugate prior on the means and variances.
See the help file for |
control |
A list of control parameters for EM. The defaults are set by the call
|
Vinv |
If the model is to include a noise term, |
warn |
A logical value indicating whether or not certain warnings
(usually related to singularity) should be issued when the
estimation fails. The default is set by |
... |
Catches unused arguments in indirect or list calls via |
Details
This is a more efficient version made available with mclust ge 6.1
using Fortran code internally.
Value
A list including the following components:
modelName |
A character string identifying the model (same as the input argument). |
z |
A matrix whose |
parameters |
|
loglik |
The log-likelihood for the estimated mixture model. |
bic |
The BIC value for the estimated mixture model. |
Attributes: |
|
Author(s)
T. Brendan Murphy, Luca Scrucca
See Also
me
,
meE
, ...,
meVVV
,
em
,
mstep
,
estep
,
priorControl
,
mclustModelNames
,
mclustVariance
,
mclust.options
Examples
w = rexp(nrow(iris))
w = w/mean(w)
c(summary(w), sum = sum(w))
z = unmap(sample(1:3, size = nrow(iris), replace = TRUE))
MEW = me.weighted(data = iris[,-5], modelName = "VVV",
z = z, weights = w)
str(MEW,1)