[R] Results of MCD estimators in MASS and rrcov
rainer grohmann
rainer.grohmann at gmx.net
Thu Jan 27 10:27:43 CET 2005
Hi!
I tested two different implementations of the robust MCD estimator:
cov.mcd from the MASS package and
covMcd from the rrcov package.
Tests were done on the hbk dataset included in the rrcov package.
Unfortunately I get quite differing results -- so the question is whether
this differences are justified or an error on my side or a bug?
Here is, what I did:
> require(MASS)
> require(rrcov)
> data(hbk)
> mass.mcd<-cov.mcd(hbk,quantile.used=57)
> rrcov.covMcd<-covMcd(hbk,alpha=0.75)
> #output from cov.mcd (MASS)
> mass.mcd$center
X1 X2 X3 Y
1.55833333 1.80333333 1.66000000 -0.08666667
> mass.mcd$cov
X1 X2 X3 Y
X1 1.12484463 0.02217514 0.1537288 0.07615819
X2 0.02217514 1.13897175 0.1814915 0.02029379
X3 0.15372881 0.18149153 1.0434576 -0.12877966
Y 0.07615819 0.02029379 -0.1287797 0.31236158
> #output from covMcd (rrcov)
> rrcov.covMcd$center
X1 X2 X3 Y
1.53770492 1.78032787 1.68688525 -0.07377049
> rrcov.covMcd$cov
X1 X2 X3 Y
X1 1.61921813 0.072595397 0.1678300 0.083905209
X2 0.07259540 1.648137481 0.2013022 0.002657454
X3 0.16782996 0.201302158 1.5306858 -0.150876964
Y 0.08390521 0.002657454 -0.1508770 0.453846286
As you can see, the results are quite different.
I tried to start both calls with 75% (=57 of 75) good data-points.
I crosschecked the results with the MCD implementation in MATLAB by Verboven
and Hubert. This functions give the same results as cov.mcd (MASS).
If somebody knows, why the results do not match, although both functions are
implementation referring to the same estimator, please tell me.
Thanks,
Rainer
--
10 GB Mailbox, 100 FreeSMS http://www.gmx.net/de/go/topmail
More information about the R-help
mailing list