CovMcd2: MCD Covariance Estimate

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

This is a slight modification of the CovMcd function from the rrcov package for use with Cerioli et al. (2009) replication and extension work presented in Green and Martin (2014). The modifications provide more flexibility in computing the reweighted MCD estimate.

Usage

1
2
3
4
5
6
7
CovMcd(x,
       raw.only=FALSE, alpha=control@alpha, nsamp=control@nsamp,
       scalefn=control@scalefn, maxcsteps=control@maxcsteps,
       initHsets=NULL, save.hsets=FALSE,
       seed=control@seed, trace=control@trace,
       use.correction=control@use.correction,
       control=CovControlMcd(), ...)

Arguments

x

See help file for CovMcd.

raw.only

See help file for CovMcd.

alpha

See help file for CovMcd.

nsamp

See help file for CovMcd.

scalefn

See help file for CovMcd.

maxcsteps

See help file for CovMcd.

initHsets

See help file for CovMcd.

save.hsets

See help file for CovMcd.

seed

See help file for CovMcd.

trace

See help file for CovMcd.

use.correction

See help file for CovMcd.

control

See help file for CovMcd.

...

See help file for CovMcd.

reweighting

A list describing how to perform the reweighting when computing the reweighted MCD estimate. The list should have the following components.

method:

Method to score observations in the reweighting. Must be a string from the set ("chisquare","empirical"). "chisquare" uses a quantile from a chi-squared distribution, while "empirical" will use a quantile from the empirical distribution of the Mahalanobis distances calculated from the unreweighted MCD estimate. Default is "chisquare".

quantile:

The quantile to use in scoring. Default is 0.975 for the chi-squared distribution, which matches how the unmodified covMcd works.

debug:

TRUE to print additional debugging information; currently prints the Mahalanobis distances (sorted) calculated from the unreweighted MCD estimate. Defaults to FALSE.

Details

This function is a modification of CovMcd from the rrcov package and uses a modified version of covMcd from the robustbase package. It works identically to those functions but allows for more flexibility in the reweighting portion of the calculation. This was needed to run/extend some of the experiments in Cerioli et al. (2009), particularly those presented in Table 3 of that paper, where the reweighting threshold is a Bonferroni-corrected quantile.

The main work is done inside covMcd2, a private function to the HardinRockeExtensionSimulations package. This function is a modified version of covMcd from the robustbase package: it replaces the quantity quantiel used in the reweighting with a function of the same name that computes the quantile specified in the reweighting argument.

Value

An S4 object of class CovMcd-class which is a subclass of the virtual class CovRobust-class. See CovMcd for more details.

Note

This function is subject to change as the CovMcd and covMcd functions change. It may also be out of sync with those functions at times.

The latest version of covMcd (from robustbase version 0.92-5) has support for a custom weighting function, so at some point in the future the need to use a modified version of covMcd might be eliminated.

Author(s)

Written and maintained by Christopher G. Green <christopher.g.green@gmail.com>.

References

Andrea Cerioli, Marco Riani, and Anthony C. Atkinson. Controlling the size of multivariate outlier tests with the mcd estimator of scatter. Statistical Computing, 19:341-353, 2009.

C. G. Green and R. Douglas Martin. An extension of a method of Hardin and Rocke, with an application to multivariate outlier detection via the IRMCD method of Cerioli. Working Paper, 2014. Available from http://students.washington.edu/cggreen/uwstat/papers/cerioli_extension.pdf

Todorov V & Filzmoser P (2009), An Object Oriented Framework for Robust Multivariate Analysis. Journal of Statistical Software, 32(3), 1–47. URL http://www.jstatsoft.org/v32/i03/.

See Also

CovMcd, covMcd

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
   require(rrcov)
   require(mvtnorm)
   alpha   <- 0.05 # significance level
   nn      <- 100  # number of observations
   p       <- 4    # dimension
   # generate some data
   simdata <- mvtnorm::rmvnorm(nn, mean=rep(0,p), sigma=diag(rep(1,p)))
   CovMcd2(simdata,
      reweighting=list(
      method="chisquare",
      quantile=1-(alpha/nn),
      debug=FALSE
    )
   )

christopherggreen/HardinRockeExtensionSimulations documentation built on May 13, 2019, 7:04 p.m.