Skip to content

Commit

Permalink
version 0.99-0
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaechler authored and cran-robot committed Jun 16, 2023
1 parent 1a0840c commit 335b69f
Show file tree
Hide file tree
Showing 56 changed files with 1,843 additions and 1,193 deletions.
10 changes: 5 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: robustbase
Version: 0.95-1
VersionNote: Released 0.95-0 on 2021-04-02 to CRAN
Date: 2023-03-28
Version: 0.99-0
VersionNote: Released 0.95-1 on 2023-03-29 to CRAN
Date: 2023-06-12
Title: Basic Robust Statistics
Authors@R: c(person("Martin","Maechler", role=c("aut","cre"), email="[email protected]", comment = c(ORCID = "0000-0002-8685-9910"))
, person("Peter", "Rousseeuw", role="ctb", comment = "Qn and Sn")
Expand Down Expand Up @@ -38,7 +38,7 @@ EnhancesNote: linked to in man/*.Rd
LazyData: yes
NeedsCompilation: yes
License: GPL (>= 2)
Packaged: 2023-03-29 15:30:58 UTC; maechler
Packaged: 2023-06-12 20:48:11 UTC; maechler
Author: Martin Maechler [aut, cre] (<https://orcid.org/0000-0002-8685-9910>),
Peter Rousseeuw [ctb] (Qn and Sn),
Christophe Croux [ctb] (Qn and Sn),
Expand All @@ -51,4 +51,4 @@ Author: Martin Maechler [aut, cre] (<https://orcid.org/0000-0002-8685-9910>),
Maria Anna di Palma [ctb] (initial version of Comedian)
Maintainer: Martin Maechler <[email protected]>
Repository: CRAN
Date/Publication: 2023-03-29 22:30:02 UTC
Date/Publication: 2023-06-16 13:30:02 UTC
110 changes: 55 additions & 55 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
66887f2a4a84d1b8823efaadb4d2e817 *ChangeLog
fb4d0cae7b1c9fd32d4007bc05fa7e94 *DESCRIPTION
284810ad07639889bbe164e3161c6156 *NAMESPACE
6e2e8d841b09370116b702aea43ee841 *DESCRIPTION
b4885ab3a2711ac13563e2d7914205b4 *NAMESPACE
a3ce2fbdbf08c335a9de3df36733deea *R/AAA.R
d37bb3049fbf35e2f99ef3b0a868ccfd *R/BYlogreg.R
7478e0bb64ef0b7c0d7ab1b778496418 *R/MTestimador2.R
Expand All @@ -12,7 +12,7 @@ d37bb3049fbf35e2f99ef3b0a868ccfd *R/BYlogreg.R
186ce151b871686bd85921f1843ed90e *R/biweight-funs.R
abd567be7414be168c4d18995c5d67b3 *R/classPC.R
b8872e7f5f158e3f742c71a8ae030ed0 *R/comedian.R
f53478934a556036f21203b840d6f0fc *R/covMcd.R
bf0e306e91a9ba8682a2f229abb85321 *R/covMcd.R
6deaedfb710eeaa98ddb990382b51a74 *R/covPlot.R
31276c72c47df1cb6aaadc1d91f38d5a *R/detmcd.R
79316c1ca445f99587e3b7d583656aed *R/glmrob.R
Expand All @@ -21,12 +21,12 @@ f53478934a556036f21203b840d6f0fc *R/covMcd.R
3f50418b4f9fd47918b8881bab58b6bb *R/glmrobPredict.R
0ca734c2ef526612ce55d4345cc2d606 *R/huber.R
08d32e9833aa6b86a3cf19a16e6b63c0 *R/huberize.R
b456cca632bb6de69f1ed8a4278e44ca *R/lmrob.M.S.R
7fd6f04272b008c290e17884b19fbdb8 *R/lmrob.MM.R
2c0de7d3e9f31c89bbde6277f7b01c55 *R/lmrob.R
51183c78cf39a9a79081b202fb76c5b7 *R/lmrob.M.S.R
330b073d37e79970ce9ee485dec273f6 *R/lmrob.MM.R
d94fda3034e091edee97035446028cca *R/lmrob.R
8130354e92350a040360b85bd36995bf *R/lmrobPredict.R
ee8e9a359407bfcce26eb0f77457f0f6 *R/ltsPlot.R
4d645592c866bbaa3ad30760d0ff20cd *R/ltsReg.R
1264577d6a3ac8d697488244038a44f0 *R/ltsPlot.R
2c5513eab26503cb0e1b03fe602a65a5 *R/ltsReg.R
a4c54a5e0f152cab1bb20dbe1d645414 *R/mc.R
621fe5b6d8087287f219f347b5fd5439 *R/nlregrob.R
91a0b9152a3ce7ca267a185336feea2f *R/nlrob.R
Expand All @@ -35,9 +35,9 @@ a4c54a5e0f152cab1bb20dbe1d645414 *R/mc.R
8abd2b0e98ad2f49011e6a6daff6540f *R/qnsn.R
1d34823c1885d395c7ec8af83fcf57b8 *R/rrcov.control.R
0ee6d9e98d6746d0a2159988002c87c7 *R/tolEllipse.R
fdc75dc916d1ea86979a0e2db71c4000 *TODO
439bf689fa27cf9affd0335332142165 *build/partial.rdb
d56ff918e0c250fcd1e4d9e75f72fda7 *build/vignette.rds
e3c37390c9512d8605789a93d301de60 *TODO
7080893e02c49cd296d4424b9be55069 *build/partial.rdb
167d54923c62dafa3fac03e2a70416b6 *build/vignette.rds
ae030dea61f2f374479a49afe8077a6d *data/Animals2.tab
19e4eaf0977f829715ae36606a377bb8 *data/CrohnD.rda
238aac3ea05d306a86708f1bb39dcdc7 *data/NOxEmissions.rda
Expand Down Expand Up @@ -83,32 +83,32 @@ dec2cf4733637e4293db3a103be23266 *data/x30o50.R
4eaa659c5287d2433f0c497b91501654 *demo/determinMCD.R
42fec336be1de77af06d15399c21b436 *inst/CITATION
5d05206ddf06ffd03093afc086a6400e *inst/Copyrights
2c551b7d02a6b04de5bb69a18eb2778f *inst/NEWS.Rd
e02b96e58bfab74df65b2cfba7d346c0 *inst/NEWS.Rd
da7f5aa078e39b61fc11c70f79acda31 *inst/doc/aggr_results.Rdata
fd283291fb16f251cb6d0899d4e9310b *inst/doc/asymptotic.max.bias.Rdata
eba4ff0f00afa90a6de4faeb8fbeb118 *inst/doc/error.distributions.R
e87e964dd949e0d5d3ac6677cf8ce850 *inst/doc/estimating.functions.R
84e4b173d0410d358ae5ed7d782d8c28 *inst/doc/fastMcd-kmini.R
c8992760bbc781798df7d3dee8839d56 *inst/doc/fastMcd-kmini.Rnw
05cf2b388c25d15127900b4a551813d8 *inst/doc/fastMcd-kmini.pdf
f5463b7ab4df574415e4386254c8e0b1 *inst/doc/fastMcd-kmini.pdf
2eb6dae5393fc8f1f3613ea7eacf362f *inst/doc/graphics.functions.R
aa4176684274cf23ab72b699568976de *inst/doc/lmrob_simulation.R
ad9971a72d917743efbdb264b7057d97 *inst/doc/lmrob_simulation.Rnw
48e1c3424dafab7da0419ba5982df9aa *inst/doc/lmrob_simulation.pdf
b9caf185aefd54b84d28174eba14ff48 *inst/doc/lmrob_simulation.pdf
f52efc8694f09fdff19c6f54fe501d45 *inst/doc/psi_functions.R
5dc951a423ecf0cea599f84e69eb1055 *inst/doc/psi_functions.Rnw
4dbede48de53fc33dfe9664f78dd5d7c *inst/doc/psi_functions.pdf
bd5faf98dba6027c1e881a11b194a99c *inst/doc/psi_functions.pdf
8fbff7afee995686ab14f490bfdd3bd7 *inst/doc/simulation.functions.R
faa9ecb70de3e867cb0b0cb8f56f3074 *inst/doc/simulation.init.R
e571b79e7316389c9251508b0a64775f *inst/external/d1k27.rda
2697fe55d9d2cd8b788e735f21fce763 *inst/include/robustbase.h
4d5298481597000e4fbabcda334a975f *inst/po/de/LC_MESSAGES/R-robustbase.mo
6ef699e2c1dc80f8f76c3ad814a43594 *inst/po/de/LC_MESSAGES/robustbase.mo
0c1f0887d5c9f0c101a53be477913c14 *inst/po/en@quot/LC_MESSAGES/R-robustbase.mo
e77162459322771f5573e520ee55eb4c *inst/po/en@quot/LC_MESSAGES/robustbase.mo
40a78aabaa45179068cf49084e280002 *inst/po/de/LC_MESSAGES/R-robustbase.mo
90290c9dfd9d241caf2eae13d29345e5 *inst/po/de/LC_MESSAGES/robustbase.mo
762910cf64bbd318d025291144129e42 *inst/po/en@quot/LC_MESSAGES/R-robustbase.mo
6fdc9161c95acfa8acb95c2694087540 *inst/po/en@quot/LC_MESSAGES/robustbase.mo
cab4f7f139761c02c5281de692c2541e *inst/xtraR/ex-funs.R
130761ff8fdad503b3eabb72b95676ab *inst/xtraR/lmrob-trace_lev.R
b65b9ee10513815ae1ce3d469496299f *inst/xtraR/m-s_fns.R
2701625bdc27b364058c331b8f773c4e *inst/xtraR/m-s_fns.R
a9bcb5636de95b43522e387217b7ed4a *inst/xtraR/mcnaive.R
e36c6c8c36b8ad9ff096d5cf2af8e5a6 *inst/xtraR/platform-sessionInfo.R
87049deac986592f8a86dc25370a2832 *inst/xtraR/plot-psiFun.R
Expand All @@ -118,14 +118,14 @@ ec07bde3c1debafbc01e5222fc7d1c4c *inst/xtraR/test-tools.R
d59c9d987e5930b5518e5f115a12fc93 *inst/xtraR/test_LTS.R
1faee3e2b0c2c41380c3e25d3f5fc067 *inst/xtraR/test_MCD.R
cc9b23ec76ba93fbd5c15656bffca0ad *man/Animals2.Rd
2c6b72764352e084191b0c1d09d1e075 *man/BYlogreg.Rd
72a11539f6913d536aa7b1661770e74e *man/BYlogreg.Rd
64236af69ca22e65d23c6fded4f74428 *man/CrohnD.Rd
aa9d84f5c4734da142178b4ae12d8083 *man/M.psi.Rd
6824d0737bc148c4db2525b346dbb22a *man/NOxEmissions.Rd
08467d483cced3e914773083f6d5ce3a *man/Qn.Rd
083dcbb9a8612332ac5e46ecf5815782 *man/SiegelsEx.Rd
c3f637a0a5930223093b8ec3ad839b87 *man/Sn.Rd
aa692684ce10fb47d49bec4f5eb9f767 *man/adjOutlyingness.Rd
1de951f6a203408a59c2bca6aec5bdda *man/adjOutlyingness.Rd
360fd8e7b1c72e10c2925ebb8d8f9a0c *man/adjbox.Rd
e5ab4ece8120c2eec58539399edfac64 *man/adjboxStats.Rd
10c2c0bbc3e33094b52a0ca24204ca97 *man/aircraft.Rd
Expand Down Expand Up @@ -167,23 +167,23 @@ b2d8d45ce15d346fd1e8df0262c0dc5b *man/huberize.Rd
0e5741ffbae2c8ab72d6c806a9875a23 *man/kootenay.Rd
b3904bd9a90c4a1744c7a10287729796 *man/lactic.Rd
f9d8358491b2a12b00b2f8a46840c94e *man/lmc-rmc.Rd
34a6eb5be483a909147651b19b681a87 *man/lmrob..D..fit.Rd
d8bfc631978504b52b8c960873201ee2 *man/lmrob..M..fit.Rd
1c18b310fb1c008792bd5e78b1ceda52 *man/lmrob.M.S.Rd
5af3b480d40e288cb4bad813d08a0089 *man/lmrob.Rd
b1117eef380ac38b510ac3945f60e430 *man/lmrob.S.Rd
2a4cc24063f1744473724ff594019a60 *man/lmrob.control.Rd
823296c1001fb79b67740695fabf0577 *man/lmrob.fit.Rd
421854278c0594171587e36b9fca8b52 *man/lmrob..D..fit.Rd
89dff1f58856e585719ac5100339be5b *man/lmrob..M..fit.Rd
2ed49fd73bc9195b09b89dc5fa3a01a5 *man/lmrob.M.S.Rd
f65774c31c61ab60b11597877e1dc62e *man/lmrob.Rd
b75a6d5c20fc53f3ed65f5226643e179 *man/lmrob.S.Rd
c4909e673a5964332086b63a9a10ccda *man/lmrob.control.Rd
96b0314be3351c453b49f9fd99c9f854 *man/lmrob.fit.Rd
0ff3ff25d0c6407c0ca8a31c4135b827 *man/lmrob.lar.Rd
d622e40aaa83ee46cd18eb6358781768 *man/los.Rd
b67da02f6a6e8c88a465f9a6a1ab1933 *man/ltsPlot.Rd
e9f2e9950c217f3a8f5e3419b9bfcfa3 *man/ltsReg.Rd
3870a4fdc63baa4ecd11650abe209585 *man/ltsReg.Rd
c4e8c8f778af02cb0f59b0cbc6d2a5ac *man/mc.Rd
7f90043269895933a5037812df80e98e *man/milk.Rd
35a4e8718b06d2eacda6e04a62b0a7dd *man/nlrob-algos.Rd
4f524b3a96b0e8a77c9ff7386b446f35 *man/nlrob.Rd
946021063d04345859980aa2415aa698 *man/nlrob.control.Rd
637c345a708230a67f888f30b112bb33 *man/outlierStats.Rd
ae1010719320274dc8f1305bf780d4fd *man/outlierStats.Rd
73ac7b614b68fde4b56425dcd14c3a7e *man/pension.Rd
8cd4b8129699cba4317d4811937a9556 *man/phosphor.Rd
59bf70cca397d8ccaab9963f939462db *man/pilot.Rd
Expand All @@ -198,7 +198,7 @@ df4376b1f8f500c99501d230a8ce225f *man/psiFunc.Rd
525bd5bf9d6fcfbfba6aef15f78ee9dc *man/psi_func-class.Rd
b51db5a87f42e8420d22fdc796aefce4 *man/pulpfiber.Rd
b162f832ac1b1721feee4d0eda5e1b5b *man/r6pack.Rd
5f49f210129f8b69df88605fea9102de *man/radarImage.Rd
b17174d919be4a796d8431f01b2c351e *man/radarImage.Rd
b3767d3ecc4211f6d8a11e6e89594e0f *man/rankMM.Rd
fa74cc0d6c0aedc3cf0ba3965253b17c *man/residuals.glmrob.Rd
8d1fe97485ffc542a81a1ddf35001741 *man/robustbase-internal.Rd
Expand Down Expand Up @@ -226,25 +226,25 @@ ed7afcd97d343cc453602f724b0a0df6 *man/vaso.Rd
281444c1e74efb2422bc9b31c6d46dca *man/wgt.himedian.Rd
d85c77f6ee7bfc5f5d6fc78ef947f7e3 *man/wood.Rd
3204032f46beebb47c7ed7ff36b0fcb2 *man/xtrData.Rd
4fc726bc844a65fd1148f249a8be4b3f *po/R-de.po
8c146ac6ceea57474e788be58e1b1268 *po/R-robustbase.pot
7f1bf272d5c2a3081a2da8cb88fd65ab *po/de.po
e0bf6b14177155339da0fad0eb818064 *po/robustbase.pot
3be12d598177fd392ce38edb4062b702 *po/R-de.po
aabff5feb60ff8aff7185da691dc8644 *po/R-robustbase.pot
d5a446c5df9af043d2f9d0fd1dd6b959 *po/de.po
09e3948827597a1c23eb38cedce78806 *po/robustbase.pot
b5ec8eb59d50008ef39073a7446433e1 *po/update-me.sh
6670f8885ea9588ef2905cb7b368a500 *src/Makevars
174d300e4520673a0114f4d6eeba98a5 *src/R-rng4ftn.c
37cbb87bdffad7231d34bdec470100b2 *src/eigen.f
f027a8f63fd9aadceeb42354e926590f *src/init.c
10fbfa941b7198e93da2594db064cce8 *src/lmrob.c
bf99e1789625d38c919340679f73ee19 *src/mc.c
7b7e6a30a73de4f1ab1ec57707a8f3fa *src/init.c
3e45e024349a7630004c837ee21a18cb *src/lmrob.c
ee8722747c8117ecea2fea89a007bd3d *src/mc.c
3b41a3d16e8b8158ea3e73c089600c09 *src/monitor.c
4a412a7e96341e9429a76dd2ffa8cea9 *src/qn_sn.c
6d2330779d4d08c3a60aefaeeed9e942 *src/rf-common.f
8e8d600eec1544c97dff077bcf1f5bbd *src/rffastmcd.f
07fcab6140b70af6edb46216af7a99c6 *src/qn_sn.c
28999bf54b45a15bee797d8e903c8986 *src/rf-common.f
7f21eefc9396c72aef5e022d5b231488 *src/rffastmcd.f
c142a095ec08ea082ea84133dfa39ca2 *src/rfltsreg.f
3bda168ffa6d97a853c1a9458466c030 *src/rllarsbi.f
17021e6a9619d735c5384e47d089caef *src/rllarsbi.f
93f5113f34542949020302b4d70e9c14 *src/rob-utils.c
c407492c61e48893a5234823e3747d25 *src/robustbase.h
8e55d7db42d0b0b88c8ede22297849f2 *src/robustbase.h
364118eacaee8ff4915c5f50097ad460 *src/rowMedians.c
bc28fcadc56c4269604e622f460a42a1 *src/rowMedians_TYPE-template.h
d2a3478b9dbb06d56cbf729dc0fe9681 *src/templates-types.h
Expand All @@ -253,15 +253,15 @@ a3a2fe76cc1fbb676f92d2da764fcaa1 *src/templates-types_undef.h
0d3d1bebd878a77ed6d2e17a34b3a265 *src/wgt_himed_templ.h
5d18a48b53c3942cd8ba54b71aa86d5c *tests/LTS-specials.R
53111611c3e4dbfe6fdd55f89db16ba0 *tests/MCD-specials.R
d0f66667fb798a04e30148e6c355e8cd *tests/MCD-specials.Rout.save
6807dbadfd0a2c714169c466c10b85fd *tests/MCD-specials.Rout.save
a9e012cd653dc67380b0d98dbf8c98c2 *tests/MT-tst.R
95d0d4a3215fd0c5c15017bf4264898a *tests/NAcoef.R
fcc6d16d710501d59914421e83c7b56b *tests/NAcoef.Rout.save
2c40e197c40a1629e3d82ec5f48342dd *tests/NAcoef.Rout.save
2c7b55a37d3d91bb7ac967daa654c0cb *tests/OGK-ex.R
2061968598e36f8ef9af0f6b3afea782 *tests/OGK-ex.Rout.save
95abceee1da97f2efc59a83579d3fd0e *tests/Qn-Sn-plots.R
ee5551e06a97b2fa119de6e770e5e3a8 *tests/Rsquared.R
58387af397fbfad9e6585c9fe48a680b *tests/Rsquared.Rout.save
de9d552599570c228f91cb4254b6746a *tests/Rsquared.Rout.save
71ce3f6b1a05667b2f4222d6f23a2a1d *tests/binom-ni-small.R
06ecf1e2d46b910a4aa0d648c48ffffd *tests/binom-ni-small.Rout.save
f6db581dcd9c17bbe848995b33c58ebe *tests/binom-no-x.R
Expand All @@ -273,12 +273,12 @@ d04013e64537927c1824d112d3fffae8 *tests/huber-etc.R
5deceffddfe5185c60c0bdde86a6e43a *tests/huber-etc.Rout.save
9cb15ced67c1892f22950f121ba2abaf *tests/large-values.R
6fbc9fe8346753a07f45d8ab56417151 *tests/lmrob-data.R
277f26848db53cabae8aa956f04bfd85 *tests/lmrob-ex12.R
6caa9c579fedb116e9345465d8bc21e3 *tests/lmrob-methods.R
ba916df3922fe2ede537197211d5ec5b *tests/lmrob-methods.Rout.save
e88f63a549f8290e14fb76d0e6cb1ff2 *tests/lmrob-ex12.R
f5816abd2a713770944d0078b2dda687 *tests/lmrob-methods.R
4def9d8c53c2a7d99455a0f7b435476e *tests/lmrob-methods.Rout.save
52977658c43665aafd4508975647b258 *tests/lmrob-psifns.R
43635706234823297a252a38b8660505 *tests/lmrob-psifns.Rout.save
db3b7b7ffcb579f702b0b57bae5dcaf9 *tests/m-s-estimator.R
c9124d4362d0b4391061ea9a20f7ee57 *tests/lmrob-psifns.Rout.save
ef94a8db6bf1fdb52d5e49dff4c5951a *tests/m-s-estimator.R
fc2e03a5567789ba9cf6dda9f2c17173 *tests/mc-etc.R
1a6476e0514f3b2ba76560fcfc0f49fb *tests/mc-strict.R
cef5181f8c1343505936180e17e80641 *tests/nlregrob-tst.R
Expand All @@ -288,12 +288,12 @@ a2ccec3324ea3363e9fc2dcbb0aeab9e *tests/psi-rho-etc.R
39e466468e228fad715bc725f30eb678 *tests/psi-rho-etc.Rout.save
a9b4b4ba78cc408071e294b4969bf99b *tests/small-sample.R
76445671c74a4ba3fc5e6ff008d902b4 *tests/small-sample.Rout.save
92580e02bb06ebb9d0d12affd4518d96 *tests/subsample.R
7a8b1f9604304826d8dcbedb7c8c5dbb *tests/subsample.R
91a7dbe2f427b417675bf21252fbd4ff *tests/tlts.R
2f36514f3f511d80bc2f08c296161193 *tests/tlts.Rout.save
dbf309eb5429b937bb50b5b6fd57651c *tests/tmcd.R
cea6f00817ea20093f9954ae480bb49a *tests/weights.R
85d7b16f1356406922c9d88c3a660615 *tests/weights.Rout.save
9c23a8eae9aac1fbe6745808da05aaa0 *tests/weights.R
0801277ffcaa81e1599077a66981e46d *tests/weights.Rout.save
c0c81b768815c0d6b240a0dadb065ea5 *tests/wgt-himed-xtra.R
8eca80b4303ef72bfaccc3ede681c0d6 *tests/wgt-himed.R
56f1be5e2e78bef6d128f3317fe64b9b *tests/wgt-himed.Rout.save
Expand Down
13 changes: 7 additions & 6 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,9 @@ S3method(anova, glmrob)

S3method(alias, lmrob)
S3method(case.names, lmrob)
## S3method(confint, lmrob, confint.lm) # fails with *warning*
## S3method(dummy.coef, lmrob, dummy.coef.lm) # S3 methods ‘confint.lm’, ‘dummy.coef.lm’
# were declared in NAMESPACE but not found
## Instead "make copies" <generic>.lmrob in R/lmrob.R and register now:
S3method(confint, lmrob)
S3method(confint, lmrob, confint.lm)## -> R bug (see below) & in R/lmrob.R
S3method(confint, nlrob)
S3method(dummy.coef, lmrob)
S3method(dummy.coef, lmrob, dummy.coef.lm)# (R bug ...)
S3method(estimethod, nlrob)
S3method(family, lmrob)
S3method(hatvalues, lmrob)
Expand All @@ -142,7 +138,12 @@ S3method(nobs, lmrob)
S3method(nobs, lmrob.S, nobs.lmrob)# use the same as "lmrob"
S3method(nobs, mcd)
S3method(residuals, lmrob)
S3method(residuals, lmrob.S)
S3method(variable.names, lmrob)
S3method(print, lmrobCtrl)
S3method(update, lmrobCtrl)
## R Bug {fixed in svn rev 84463}: needs within.list in our NS:
S3method(within, lmrobCtrl, within.list)
S3method(weights, glmrob)
S3method(weights, lmrob)
S3method(weights, lmrob.S, weights.lmrob)# use the same as "lmrob"
Expand Down
37 changes: 23 additions & 14 deletions R/covMcd.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,11 @@ covMcd <- function(x,
logdet.Lrg <- 50 ## <-- FIXME add to rrcov.control() and then use that
## Analyze and validate the input parameters ...
if(length(seed) > 0) {
if(length(seed) < 3 || seed[1L] < 100)
if(length(seed) < 3L || seed[1L] < 100L)
stop("invalid 'seed'. Must be compatible with .Random.seed !")
if(exists(".Random.seed", envir=.GlobalEnv, inherits=FALSE)) {
seed.keep <- get(".Random.seed", envir=.GlobalEnv, inherits=FALSE)
on.exit(assign(".Random.seed", seed.keep, envir=.GlobalEnv))
}
assign(".Random.seed", seed, envir=.GlobalEnv)
if(!is.null(seed.keep <- get0(".Random.seed", envir = .GlobalEnv, inherits = FALSE)))
on.exit(assign(".Random.seed", seed.keep, envir = .GlobalEnv))
assign(".Random.seed", seed, envir = .GlobalEnv)
}

## For back compatibility, as some new args did not exist pre 2013-04,
Expand Down Expand Up @@ -238,7 +236,13 @@ covMcd <- function(x,
ans <- c(ans, cov.wt(x, wt = weights, cor=cor))

if(sum.w != n) {
cdelta.rew <- .MCDcons(p, sum.w/n) ## VT::19.3.2007
## VT::05.04.2023
## The correct consistency correction factor for the reweighted estimate
## would be .MCDcons(p, 0.975) and not .MCDcons(p, sum.w/n) - see mail from
## Andreas Alfons from 29.01.2020 and Croux and Haesbroeck (1999), equations 4.1 and 4.2.
## cdelta.rew <- .MCDcons(p, sum.w/n) ## VT::19.3.2007
cdelta.rew <- .MCDcons(p, 0.975)

correct.rew <- if(use.correction) .MCDcnp2.rew(p, n, alpha) else 1.
cnp2 <- c(cdelta.rew, correct.rew)
ans$cov <- cdelta.rew * correct.rew * ans$cov
Expand Down Expand Up @@ -337,7 +341,12 @@ covMcd <- function(x,
## Compute and apply the consistency correction factor for
## the reweighted cov
if(!sing.rewt && sum.w != n) {
cdelta.rew <- .MCDcons(p, sum.w/n) ## VT::19.3.2007
## VT::05.04.2023
## The correct consistency correction factor for the reweighted estimate
## would be .MCDcons(p, 0.975) and not .MCDcons(p, sum.w/n) - see mail from
## Andreas Alfons from 29.01.2020 and Croux and Haesbroeck (1999), equations 4.1 and 4.2.
## cdelta.rew <- .MCDcons(p, sum.w/n) ## VT::19.3.2007
cdelta.rew <- .MCDcons(p, 0.975)
correct.rew <- if(use.correction) .MCDcnp2.rew(p, n, alpha) else 1.
cnp2 <- c(cdelta.rew, correct.rew)
ans$cov <- cdelta.rew * correct.rew * ans$cov
Expand Down Expand Up @@ -534,11 +543,11 @@ print.mcd <- function(x, digits = max(3, getOption("digits") - 3), print.gap = 2
"\n", sep="")
## VT::29.03.2007 - solve a conflict with fastmcd() in package robust -
## also returning an object of class "mcd"
xx <- NA
if(!is.null(x$crit))
xx <- format(x$crit, digits = digits)
else if (!is.null(x$raw.objective))
xx <- format(log(x$raw.objective), digits = digits)
xx <- if(!is.null(x$crit))
format(x$crit, digits = digits)
else if (!is.null(x$raw.objective))
format(log(x$raw.objective), digits = digits)
else NA
cat("Log(Det.): ", xx , "\n\nRobust Estimate of Location:\n")
print(x$center, digits = digits, print.gap = print.gap, ...)
cat("Robust Estimate of Covariance:\n")
Expand Down Expand Up @@ -588,7 +597,7 @@ print.summary.mcd <-
##' (see calfa in Croux and Haesbroeck)
##' @param p
##' @param alpha alpha ~= h/n = quan/n
##' also use for the reweighted MCD, calling with alpha = 'sum(weights)/n'
##' also use for the reweighted MCD, calling with alpha = 0.975
MCDcons <- # <- *not* exported, but currently used in pkgs rrcov, rrcovNA
.MCDcons <- function(p, alpha)
{
Expand Down
Loading

0 comments on commit 335b69f

Please sign in to comment.