Learn R Programming

robust (version 0.3-0)

covRob: Robust Covariance/Correlation Matrix Estimation

Description

Computes robust estimates of multivariate location and scatter.

Usage

covRob(data, corr = FALSE, distance = TRUE, na.action = na.fail, estim = "auto", control = covRob.control(estim, ...), ...)

Arguments

data
a numeric matrix or data frame containing the data.
corr
a logical flag. If corr = TRUE then the estimated correlation matrix is computed.
distance
a logical flag. If distance = TRUE the Mahalanobis distances are computed.
na.action
a function to filter missing data. The default na.fail produces an error if missing values are present. An alternative is na.omit which deletes observations that contain one or more missing values.
estim
the robust estimator to be used. The choices are: "mcd" for the Fast MCD algorithm of Rousseeuw and Van Driessen, "donostah" for the Donoho-Stahel projection based estimator, "M" for the constrained M estimator provided by Rocke, "pairwiseQC" for the ort
control
a list of control parameters to be used in the numerical algorithms. See covRob.control for the possible control parameters and their default settings. This argument is ignored when estim = "auto".
...
control parameters may be passed directly when estim != "auto".

Value

  • an object of class "covRob" with components:
  • callan image of the call that produced the object with all the arguments named.
  • cova numeric matrix containing the final robust estimate of the covariance/correlation matrix.
  • centera numeric vector containing the final robust estimate of the location vector.
  • raw.cova numeric matrix containing the initial robust estimate of the covariance/correlation matrix.
  • raw.centera numeric vector containing the initial robust estimate of the location vector.
  • dista numeric vector containing the Mahalanobis distances computed using robust estimates of covariance and location contained in cov and center. Only present if distance = TRUE in the call.
  • corra logical flag. If corr = TRUE then cov and raw.cov contain robust estimates of the correlation matrix of x.
  • estima character vector of length 1 containing the name of the robust estimator.
  • controla list containing the control parameters used by the robust estimator.

See Also

covRob.control, cov, fastmcd, donostah, fastcov, rockem.

Examples

Run this code
data(stack.dat)
  covRob(stack.dat, estim = "mcd", quan = .75, ntrial = 1000)

Run the code above in your browser using DataLab