covOGK {robustbase} | R Documentation |
Computes the orthogonalized pairwise covariance matrix estimate described in in Maronna and Zamar (2002). The pairwise proposal goes back to Gnanadesikan and Kettenring (1972).
covOGK(X, n.iter, sigmamu, rcov = covGK, weight.fn, keep.data = FALSE, ...)
X |
data in something that can be coerced into a numeric matrix. |
n.iter |
number of orthogonalization iterations. Usually 1 or 2; values greater than 2 are unlikely to have any significant effect on the estimate (other than increasing the computing time). |
sigmamu |
a function that computes univariate robust location and
scale estimates. By default sigmamu should return a single
numeric value containing the robust scale (standard deviation)
estimate. When mu.too is true, sigmamu() should
return a numeric vector of length 2 containing robust location and
scale estimates. See scaleTau2 for an example. |
rcov |
function that computes a robust covariance estimate
between two vectors. The default, Gnanadesikan-Kettenring's
covGK , is simply (s^2(X+Y) - s^2(X-Y))/4 where
s() is the scale estimate sigmamu() . |
weight.fn |
a function of the robust distances and the number of variables p to compute the weights used in the reweighting step. |
keep.data |
logical indicating if the (untransformed) data matrix
X should be kept as part of the result. |
... |
additional arguments to be passed to sigmamu() and
weight.fn() . |
Typical default values for the function arguments
sigmamu
, rcov
, and weight.fn
, are
available as well, see the Examples below,
but their names and calling sequences are
still subject to discussion and may be changed in the future.
currently a list with components
center |
robust location: numeric vector of length p. |
cov |
robust covariance matrix estimate: p x p matrix. |
wcenter, wcov |
re-weighted versions of center and
cov . |
weights |
the robustness weights used. |
distances |
the mahalanobis distances computed using
center and cov . |
......
but note that this might be radically changed to returning an
S4 classed object!
Kjell Konis konis@stats.ox.ac.uk, with modifications by Martin Maechler.
Maronna, R.A. and Zamar, R.H. (2002) Robust estimates of location and dispersion of high-dimensional datasets; Technometrics 44(4), 307–317.
Gnanadesikan, R. and John R. Kettenring (1972) Robust estimates, residuals, and outlier detection with multiresponse data. Biometrics 28, 81–124.
data(hbk) hbk.x <- data.matrix(hbk[, 1:3]) cO1 <- covOGK(hbk.x, n.iter = 2, sigmamu = scaleTau2, weight.fn = hard.rejection)