me.weighted | R Documentation |
Implements the EM algorithm for fitting Gaussian mixture models parameterized by eigenvalue decomposition, when observations have weights, starting with the maximization step.
me.weighted(data, modelName, z, weights = NULL, prior = NULL,
control = emControl(), Vinv = NULL, warn = NULL, ...)
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 |
This is a more efficient version made available with mclust ge 6.1
using Fortran code internally.
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: |
|
T. Brendan Murphy, Luca Scrucca
me
,
meE
, ...,
meVVV
,
em
,
mstep
,
estep
,
priorControl
,
mclustModelNames
,
mclustVariance
,
mclust.options
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.