View source: R/cellwiseWeights.R
cwLocScat | R Documentation |
Computes different estimators of multivariate location and scatter for cellwise weighted data.
cwLocScat(X, W, methods = "all", lmin = 1e-3,
crit = 1e-12, maxiter= 1000,
initCwCov = FALSE, initEst = NULL)
X |
An |
W |
An |
methods |
either |
lmin |
if not |
crit |
convergence criterion of successive mu and Sigma estimates in the EM algorithm. |
maxiter |
maximal number of iteration steps in EM. |
initCwCov |
if |
initEst |
if not |
A list with components:
cwMean
the explicit cellwise weighted mean.
cwCov
explicit cellwise weighted covariance matrix.
Is asymptotically normal but not necessarily
PSD (unless a nonnegative lmin
was specified).
sqrtCov
the cellwise weighted covariance matrix of Van
Aelst et al (2011). Also asymptotically normal
but not necessarily PSD (unless a nonnegative
lmin
was specified).
cwMLEmu
the location estimate obtained by the cwMLE.
cwMLEsigma
the covariance matrix obtained by the cwMLE.
Is PSD when the EM algorithm converges.
P.J. Rousseeuw
P.J. Rousseeuw (2022). Analyzing cellwise weighted data, ArXiv:2209.12697. (link to open access pdf)
weightedEM
,
unpack
data("data_personality_traits")
X <- data_personality_traits$X
W <- data_personality_traits$W
fit <- cwLocScat(X, W)
fit$cwMLEiter # number of iteration steps taken
round(fit$cwMLEmu, 2)
round(fit$cwMean, 2)
round(fit$cwMLEsigma, 2)
round(fit$cwCov, 2)
# For more examples, we refer to the vignette:
## Not run:
vignette("cellwise_weights_examples")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.