R/covmcd.R

covmcd <-
function(x,nsamp="sample"){
#
# nsamp="best" is the default used by R,
# meaning that  the number of samples is chosen so that
# exhaustive enumeration is done up to 5000 samples
# nsamp="sample" the number of samples
#  is min(5*p, 3000)
#
library(MASS)
oldSeed <- .Random.seed
val<-cov.mcd(x,nsamp=nsamp)
assign(x='.Random.seed', value=oldSeed, envir=.GlobalEnv)
list(center=val$center,cov=val$cov)
}
musto101/wilcox_R documentation built on May 23, 2019, 10:52 a.m.