covMcd(x, cor = FALSE, alpha = 1/2, nsamp = 500, seed = NULL,
trace = FALSE, use.correction = TRUE, control)cor = FALSEalpha*n
observations are used for computing the determinant. Allowed values
are between 0.5 and 1 and the default is 0.5."best"
or "exact". Default is nsamp = 500. For
nsamp = "best" exhaustive enumeration is done, as long as the
number of trials does not excrrcov.control.FALSE.TRUE.control is
supplied, the parameters from it will be used. If parameters are
passed also in the invocation statement, they w"mcd" which is basically a list with
componentscor = TRUE).best is equal to quan.NAs.quan equals n.obs, the MCD is the classical covariance
matrix.match.call).covMcd() is similar to the existing Rfunction
cov.mcd() in raw.cnp2
of length 2. Based on these raw MCD estimates, a reweighting step is performed
which increases the finite-sample eficiency 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.cov.mcd from package covOGK as cheaper alternative for larger dimensions.data(hbk)
hbk.x <- data.matrix(hbk[, 1:3])
covMcd(hbk.x)
## the following three statements are equivalent
c1 <- covMcd(hbk.x, alpha = 0.75)
c2 <- covMcd(hbk.x, control = rrcov.control(alpha = 0.75))
## direct specification overrides control one:
c3 <- covMcd(hbk.x, alpha = 0.75,
control = rrcov.control(alpha=0.95))
c1Run the code above in your browser using DataLab