scaleTau2 {robustbase} | R Documentation

## Robust Tau-Estimate of Scale

### Description

Computes the robust τ-estimate of univariate scale, as proposed by Maronna and Zamar (2002); improved by a consistency factor,

### Usage

    scaleTau2(x, c1 = 4.5, c2 = 3.0, consistency = TRUE,
              sigma0 = median(x.), mu.too = FALSE)

### Arguments

`x` | numeric vector
`c1,c2` | non-negative numbers, specifying cutoff values for the biweighting of the mean and the rho function respectively.
`consistency` | logical indicating if the consistency correction factor (for the scale) should be applied.
`sigma0` | the initial scale estimate s0, defaulting to the MAD; may be set to a positive value when the MAD is zero.
`mu.too` | logical indicating if both location and scale should be returned or just the scale (when `mu.too=FALSE` as by default).

### Details

First, s0 := MAD, i.e. the equivalent of `mad(x, constant=1)` is computed. Robustness weights w_i := w_{c1}((x_i - med(X))/ s_0) are computed, where w_c(u) = max(0, (1 - (u/c)^2)^2). The robust location measure is defined as μ(X) := (∑_i w_i x_i)/(∑_i w_i), and the robust tau-estimate is s(X)^2 := s_0^2 * (1/n) ∑_i ρ_{c2}((x_i - μ(X))/s_0), where ρ_c(u) = min(c^2, u^2).
`scaleTau2(*, consistency=FALSE)` returns s(X), whereas this value is divided by its asymptotic limit when `consistency = TRUE` as by default.

Note that for `n = length(x) == 2`, all equivariant scale estimates are proportional, and specifically, `scaleTau2(x, consistency=FALSE) == mad(x, constant=1)`. See also the reference.

### Value

numeric vector of length one (if `mu.too` is `FALSE` as by default) or two (when `mu.too = TRUE`) with robust scale or (location,scale) estimators s^(x) or (m^(x), s^(x)).

### Author(s)

Original by Kjell Konis with substantial modifications by Martin Maechler.

### References

Maronna, R.A. and Zamar, R.H. (2002) Robust estimates of location and dispersion of high-dimensional datasets; Technometrics 44(4), 307–317.

Yohai, V.J., and Zamar, R.H. (1988). High breakdown-point estimates of regression by means of the minimization of an efficient scale. Journal of the American Statistical Association 83, 406–413.

### See Also

`Sn`, `Qn`, `mad`; further `covOGK` for which `scaleTau2` was designed.

### Examples

    x <- c(1:7, 1000)
    sd(x) # non-robust std.deviation
    scaleTau2(x)
    scaleTau2(x, mu.too = TRUE)

    if(doExtras <- robustbase:::doExtras()) {
     set.seed(11)
     ## show how much faster this is, compared to Qn
     x <- sample(c(rnorm(1e6), rt(5e5, df=3)))
     (system.time(Qx <- Qn(x)))         ## 2.04 [2017-09, lynne]
     (system.time(S2x <- scaleTau2(x))) ## 0.25    (ditto)
     cbind(Qn = Qx, sTau2 = S2x)
    }##       Qn    sTau2
    ##  1.072556 1.071258

[Package robustbase version 0.93-4 Index]