| Language Reference |
finds the minimum covariance determinant estimator
| n | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 500 | 50 | 22 | 17 | 15 | 14 | 0 | 0 | 0 | 0 |
| n | 11 | 12 | 13 | 14 | 15 |
| 0 | 0 | 0 | 0 | 0 |
For
and
(three explanatory variables
including intercept), you obtain a total of 5,985
different subsets of 4 observations out of 21.
If you decide not to specify optn[5],
the MCD algorithm chooses 500 random sample subsets,
as in the following code:
/* X1 X2 X3 Y Stackloss data */
aa = { 1 80 27 89 42,
1 80 27 88 37,
1 75 25 90 37,
1 62 24 87 28,
1 62 22 87 18,
1 62 23 87 18,
1 62 24 93 19,
1 62 24 93 20,
1 58 23 87 15,
1 58 18 80 14,
1 58 18 89 14,
1 58 17 88 13,
1 58 18 82 11,
1 58 19 93 12,
1 50 18 89 8,
1 50 18 86 7,
1 50 19 72 8,
1 50 19 79 8,
1 50 20 80 9,
1 56 20 82 15,
1 70 20 91 15 };
a = aa[,2:4]; optn = j(8,1,.); optn[1]= 2; /* ipri */ optn[2]= 1; /* pcov: print COV */ optn[3]= 1; /* pcor: print CORR */ CALL MCD(sc,xmcd,dist,optn,a);
The first part of the output of this program
is a summary of the MCD algorithm
and the final
points selected, as follows:
Fast MCD by Rousseeuw and Van Driessen
Number of Variables 3
Number of Observations 21
Default Value for h 12
Specified Value for h 12
Breakdown Value 42.86
- Highest Possible Breakdown Value -
The best half of the entire data set obtained after full
iteration consists of the cases:
4 5 6 7 8 9 10 11 12 13 14 20
The second part of the output is the MCD estimators of the location, scatter matrix, and correlation matrix, as follows:
MCD Location Estimate
VAR1 VAR2 VAR3
59.5 20.833333333 87.333333333
Average of 12 Selected Points
MCD Scatter Matrix Estimate
VAR1 VAR2 VAR3
VAR1 5.1818181818 4.8181818182 4.7272727273
VAR2 4.8181818182 7.6060606061 5.0606060606
VAR3 4.7272727273 5.0606060606 19.151515152
Determinant = 238.07387929
Covariance Matrix of 12 Selected Points
MCD Correlation Matrix
VAR1 VAR2 VAR3
VAR1 1 0.7674714142 0.4745347313
VAR2 0.7674714142 1 0.4192963398
VAR3 0.4745347313 0.4192963398 1
The MCD scatter matrix is multiplied by a factor to make it
consistent when all the data come from a single Gaussian
distribution.
Consistent Scatter Matrix
VAR1 VAR2 VAR3
VAR1 8.6578437815 8.0502757968 7.8983838007
VAR2 8.0502757968 12.708297013 8.4553211199
VAR3 7.8983838007 8.4553211199 31.998580526
Determinant = 397.77668436
The final output presents a table containing the classical
Mahalanobis distances, the robust distances, and the weights
identifying the outlying observations (that is, leverage points
when explaining
with these three regressor variables):
Classical Distances and Robust (Rousseeuw) Distances
Unsquared Mahalanobis Distance and
Unsquared Rousseeuw Distance of Each Observation
Mahalanobis Robust
N Distances Distances Weight
1 2.253603 12.173282 0
2 2.324745 12.255677 0
3 1.593712 9.263990 0
4 1.271898 1.401368 1.000000
5 0.303357 1.420020 1.000000
6 0.772895 1.291188 1.000000
7 1.852661 1.460370 1.000000
8 1.852661 1.460370 1.000000
9 1.360622 2.120590 1.000000
10 1.745997 1.809708 1.000000
11 1.465702 1.362278 1.000000
12 1.841504 1.667437 1.000000
13 1.482649 1.416724 1.000000
14 1.778785 1.988240 1.000000
15 1.690241 5.874858 0
16 1.291934 5.606157 0
17 2.700016 6.133319 0
18 1.503155 5.760432 0
19 1.593221 6.156248 0
20 0.807054 2.172300 1.000000
21 2.176761 7.622769 0
Robust distances are based on reweighted estimates.
The cutoff value is the square root of the 0.975 quantile of
the chi square distribution with 3 degrees of freedom.
Points whose robust distance exceeds 3.0575159206 have received
a zero weight in the last column above.
There were 9 such points in the data.
These may include boundary cases.
Only points whose robust distance is substantially larger
than the cutoff should be considered outliers.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.