Robust Location and Scatter Estimation via MCD
Computes a robust multivariate location and scatter estimate with a high breakdown point, using the ‘Fast MCD’ (Minimum Covariance Determinant) estimator.
CovMcd(x, raw.only=FALSE, alpha=control@alpha, nsamp=control@nsamp, scalefn=control@scalefn, maxcsteps=control@maxcsteps, initHsets=NULL, save.hsets=FALSE, seed=control@seed, trace=control@trace, use.correction=control@use.correction, control=CovControlMcd(), ...)
x |
a matrix or data frame. |
raw.only |
should only the “raw” estimate be returned. |
alpha |
numeric parameter controlling the size of the subsets
over which the determinant is minimized, i.e., |
nsamp |
number of subsets used for initial estimates or For |
scalefn |
|
maxcsteps |
maximal number of concentration steps in the deterministic MCD; should not be reached. |
initHsets |
NULL or a K x h integer matrix of initial
subsets of observations of size h (specified by the indices in
|
save.hsets |
(for deterministic MCD) logical indicating if the
initial subsets should be returned as |
seed |
starting value for random generator. Default is |
trace |
whether to print intermediate results. Default is |
use.correction |
whether to use finite sample correction factors.
Default is |
control |
a control object (S4) of class |
... |
potential further arguments passed to robustbase's
|
This function computes the minimum covariance determinant estimator
of location and scatter and returns an S4 object of class
CovMcd-class
containing the estimates.
The implementation of the function is similar to the existing R function
covMcd()
which returns an S3 object.
The MCD method looks for the h (> n/2)
observations (out of n) whose classical
covariance matrix has the lowest possible determinant. The raw MCD
estimate of location is then the average of these h points,
whereas the raw MCD estimate of scatter is their covariance matrix,
multiplied by a consistency factor and a finite sample correction factor
(to make it consistent at the normal model and unbiased at small samples).
Both rescaling factors are returned also in the vector raw.cnp2
of length 2. Based on these raw MCD estimates, a reweighting step is performed
which increases the finite-sample efficiency considerably - see Pison et al. (2002).
The rescaling factors for the reweighted estimates are returned in the
vector cnp2
of length 2. Details for the computation of the finite
sample correction factors can be found in Pison et al. (2002).
The finite sample corrections can be suppressed by setting use.correction=FALSE
.
The implementation in rrcov uses the Fast MCD algorithm of Rousseeuw and Van Driessen (1999)
to approximate the minimum covariance determinant estimator.
An S4 object of class CovMcd-class
which is a subclass of the
virtual class CovRobust-class
.
Valentin Todorov valentin.todorov@chello.at
P. J. Rousseeuw and A. M. Leroy (1987) Robust Regression and Outlier Detection. Wiley.
P. J. Rousseeuw and K. van Driessen (1999) A fast algorithm for the minimum covariance determinant estimator. Technometrics 41, 212–223.
M. Hubert, P. Rousseeuw and T. Verdonck (2012) A deterministic algorithm for robust location and scatter. Journal of Computational and Graphical Statistics 21(3), 618–637.
Pison, G., Van Aelst, S., and Willems, G. (2002), Small Sample Corrections for LTS and MCD, Metrika, 55, 111-123.
Todorov V & Filzmoser P (2009), An Object Oriented Framework for Robust Multivariate Analysis. Journal of Statistical Software, 32(3), 1–47. URL http://www.jstatsoft.org/v32/i03/.
cov.rob
from package MASS
data(hbk) hbk.x <- data.matrix(hbk[, 1:3]) CovMcd(hbk.x) cD <- CovMcd(hbk.x, nsamp = "deterministic") summary(cD) ## the following three statements are equivalent c1 <- CovMcd(hbk.x, alpha = 0.75) c2 <- CovMcd(hbk.x, control = CovControlMcd(alpha = 0.75)) ## direct specification overrides control one: c3 <- CovMcd(hbk.x, alpha = 0.75, control = CovControlMcd(alpha=0.95)) c1
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.