CovSest {rrcov} | R Documentation |
Computes S-Estimates of multivariate location and scatter based on Tukey's biweight function using a fast algorithm similar to the one proposed by Salibian-Barrera and Yohai (2006) for the case of regression. Alternativley, the Ruppert's SURREAL algorithm can be used.
CovSest(x, nsamp = 500, bdp = 0.5, seed = NULL, trace = FALSE, tolSolve = 1e-13, algo = c("sfast", "surreal"), control)
x |
a matrix or data frame. |
nsamp |
the number of random subsets considered. Default is nsamp = 500 |
bdp |
required breakdown point. Allowed values are between
(n - p)/(2 * n) and 1 and the default is 0.5 |
seed |
starting value for random generator. Default is seed = NULL . |
trace |
whether to print intermediate results. Default is trace = FALSE . |
tolSolve |
numeric tolerance to be used for inversion
(solve ) of the covariance matrix in
mahalanobis . |
algo |
Which algorithm to use: 'sfast'=FAST-S or 'surreal'=SURREAL |
control |
a control object (S4) of class CovControlSest-class
containing estimation options - same as these provided in the fucntion
specification. If the control object is supplied, the parameters from it
will be used. If parameters are passed also in the invocation statement, they will
override the corresponding elements of the control object. |
Computes biweight multivariate S-estimator of location and scatter. The
algorithm used is similar to the one proposed by Salibian-Barrera and Yohai (2006)
for the case of regression. Alternativley, if the parameter algo
is set to
surreal
the Ruppert's SURREAL algorithm will be used.
An S4 object of class CovSest-class
which is a subclass of the
virtual class CovRobust-class
.
Valentin Todorov valentin.todorov@chello.at and Matias Salibian-Barrera matias@stat.ubc.ca. See also the code from Kristel Joossens, K.U. Leuven, Belgium and Ella Roelant, Ghent University, Belgium.
H.P. Lopuhaä (1989) On the Relation between S-estimators and M-estimators of Multivariate Location and Covariance. Annals of Statistics 17 1662–1683.
D. Ruppert (1992) Computing S Estimators for Regression and Multivariate Location/Dispersion. Journal of Computational and Graphical Statistics 1 253–270.
M. Salibian-Barrera and V. Yohai (2006) A fast algorithm for {S}-regression estimates, Journal of Computational and Graphical Statistics, 15, 414–427.
library(rrcov) data(hbk) hbk.x <- data.matrix(hbk[, 1:3]) CovSest(hbk.x) ## the following four statements are equivalent c0 <- CovSest(hbk.x) c1 <- CovSest(hbk.x, bdp = 0.25) c2 <- CovSest(hbk.x, control = CovControlSest(bdp = 0.25)) c3 <- CovSest(hbk.x, control = new("CovControlSest", bdp = 0.25)) ## direct specification overrides control one: c4 <- CovSest(hbk.x, bdp = 0.40, control = CovControlSest(bdp = 0.25)) c1 summary(c1) plot(c1) ## Use the SURREAL algorithm of Ruppert cr <- CovSest(hbk.x, algo="surreal") cr