covRob {RobStatTM}R Documentation

Robust multivariate location and scatter estimators

Description

This function computes robust estimators for multivariate location and scatter.

Usage

covRob(X, type = "auto", maxit = 50, tol = 1e-04, corr = FALSE)

Arguments

X

a data matrix with observations in rows.

type

a string indicating which estimator to compute. Valid options are "Rocke" for Rocke's S-estimator, "MM" for an MM-estimator with a SHR rho function, or "auto" (default) which selects "Rocke" if the number of variables is greater than or equal to 10, and "MM" otherwise.

maxit

Maximum number of iterations, defaults to 50.

tol

Tolerance for convergence, defaults to 1e-4.

corr

A logical value. If TRUE a correlation matrix is included in the element cor of the returned object. Defaults to FALSE.

Details

This function computes robust estimators for multivariate location and scatter. The default behaviour (type = "auto") computes a "Rocke" estimator (as implemented in covRobRocke) if the number of variables is greater than or equal to 10, and an MM-estimator with a SHR rho function (as implemented in covRobMM) otherwise.

Value

A list with class “covClassic” with the following components:

center

The location estimate.

cov

The scatter matrix estimate, scaled for consistency at the normal distribution.

cor

The correlation matrix estimate, if the argument cor equals TRUE. Otherwise it is set to NULL.

dist

Robust Mahalanobis distances

wts

weights

call

an image of the call that produced the object with all the arguments named. The matched call.

mu

The location estimate. Same as center above.

V

The scatter matrix estimate, scaled for consistency at the normal distribution. Same as cov above.

Author(s)

Ricardo Maronna, rmaronna@retina.ar

References

http://www.wiley.com/go/maronna/robust

See Also

covRobRocke, covRobMM

Examples

data(bus)
X0 <- as.matrix(bus)
X1 <- X0[,-9]
tmp <- covRob(X1)
round(tmp$cov[1:10, 1:10], 3)
tmp$mu


[Package RobStatTM version 1.0.8 Index]