Learn R Programming

robustbase (version 0.99-4-1)

rrcov.control: Control Settings for covMcd and ltsReg

Description

Auxiliary function for passing the estimation options as parameters to the estimation functions.

Usage

rrcov.control(alpha = 1/2, method = c("covMcd", "covComed", "ltsReg"),
              nsamp = 500, nmini = 300, kmini = 5,
              seed = NULL, tolSolve = 1e-14,
              scalefn = "hrv2012", maxcsteps = 200,
              trace = FALSE,
              wgtFUN = "01.original", beta,
              use.correction = identical(wgtFUN, "01.original"),
              adjust = FALSE)

Value

A list with components, as the parameters passed by the invocation

Arguments

alpha

This parameter controls the size of the subsets over which the determinant is minimized, i.e., alpha*n observations are used for computing the determinant. Allowed values are between 0.5 and 1 and the default is 0.5.

method

a string specifying the “main” function for which rrcov.control() is used. This currently only makes a difference to determine the default for beta.

nsamp

number of subsets used for initial estimates or "best" or "exact". Default is nsamp = 500. If nsamp="best" exhaustive enumeration is done, as far as the number of trials do not exceed 5000. If nsamp="exact" exhaustive enumeration will be attempted however many samples are needed. In this case a warning message will be displayed saying that the computation can take a very long time.

nmini, kmini

for covMcd: For large \(n\), the algorithm splits the data into maximally \(kmini\) subsets of targetted size nmini. See covMcd for more details.

seed

initial seed for R's random number generator; see .Random.seed and the description of the seed argument in lmrob.control.

tolSolve

numeric tolerance to be used for inversion (solve) of the covariance matrix in mahalanobis.

scalefn

(for deterministic covMcd():) a character string or function for computing a robust scale estimate. The current default "hrv2012" uses the recommendation of Hubert et al (2012); see covMcd for more.

maxcsteps

integer specifying the maximal number of concentration steps for the deterministic MCD.

trace

logical or integer indicating whether to print intermediate results. Default is trace = FALSE.

wgtFUN

a character string or function, specifying how the weights for the reweighting step should be computed, see ltsReg, covMcd or covComed, respectively. The default is specified by "01.original", as the resulting weights are 0 or 1. Alternative string specifications need to match names(.wgtFUN.covComed) - which currently is experimental.

beta

a quantile, experimentally used for some of the prespecified wgtFUNs, see e.g., .wgtFUN.covMcd and .wgtFUN.covComed.

use.correction

whether to use finite sample correction factors. Defaults to TRUE.

adjust

(for ltsReg():) whether to perform intercept adjustment at each step. Because this can be quite time consuming, the default is adjust = FALSE.

Author

Valentin Todorov

See Also

For details, see the documentation about ltsReg and covMcd, respectively.

Examples

Run this code
data(Animals, package = "MASS")
brain <- Animals[c(1:24, 26:25, 27:28),]
data(hbk)
hbk.x <- data.matrix(hbk[, 1:3])

ctrl <- rrcov.control(alpha=0.75, trace=TRUE)
covMcd(hbk.x,      control = ctrl)
covMcd(log(brain), control = ctrl)

Run the code above in your browser using DataLab