help mregress 
-------------------------------------------------------------------------------

Title

mcd -- Minimum Covariance Determinant estimator of location and scatter

Syntax mcd varlist [if] [in] [, options]

options Description ------------------------------------------------------------------------- Model e(#) maximal expected proportion of outliers proba(#) probability of selecting at least one clean sumple in the p-subset algorithm trim(#) percentage of trimming outlier return robust Mahalanobis distances and flag outliers bestsampl flag oservations used for estimating the trimmed covariance matrix raw return the raw robust covariance matrix setseed(#) set the seed

Description

mcd finds the Minimum Covariance Determinant estimator of location and scatter. By default, the one step reweighted MCD robust covariance matrix is saved in matrix covRMCD and the one step reweighted MCD robust location vector is saved in matrix locationRMCD.

Options

+-------+ ----+ Model +------------------------------------------------------------

e(#) sets the expected percentage of outliers existing in the dataset. Setting it high, slows down the algorithm. It is set by default to 0.2 but can take any value ranging from 0 to 0.5.

proba(#) sets the probability of having at least one non-corrupt sample among all those considered. It is set by default to 0.99 but can take any value ranging from 0 to 0.9999.

trim(#) sets the trimming. It is set by default to 0.5 but can take any value ranging from 0 to 0.5.

outlier creates a dummy identifying multivariate outliers and returns robust distances.

bestsample flags the subsample used for estimating the MCD location vector and scatter matrix.

raw returns the genuine MCD location vector (locationMCD) and covariance matrix (covMCD) rather than the one step reweighted (the default). The reweighted location vector and covariance matrix are computed using classical estimators on the dataset cleaned of identified outliers.

setseed(#) allows the user to set a seed. Setting the seed allows to replicate the results.

Examples

Setup . webuse auto Estimate robust Mahalanobis distances . mcd mpg headroom trunk weight length turn displacement gear_ratio, outlier Display the robust reweighted covariance matrix and location vector . matrix list covRMCD . matrix list locationRMCD Same as above bust using the raw data . mcd mpg headroom trunk weight length turn displacement gear_ratio, outlier raw Display the robust raw covariance matrix and location vector . matrix list covMCD . matrix list locationMCD

References

Rousseeuw, P.J. and Van Driessen, K. (1999). "A fast algorithm for the minimum covariance determinant estimator". Technometrics, 41, 212--223.

Also see

Online: [R] qreg, [R] regress; [R] rreg, mmregress, sregress, msregress, mregress