Skip to contents

A robust measure of dispersion. With M the sample median and MAD the unscaled median absolute deviation, set Y = (x - M) / (9 MAD) and a = 1 when |Y| < 1 and 0 otherwise. Then \(zeta = sqrt(n) sqrt(sum(a (x - M)^2 (1 - Y^2)^4)) / |sum(a (1 - Y^2)(1 - 5 Y^2))|\), and the biweight midvariance is zeta^2.

Usage

Bimid(x)

Arguments

x

Numeric vector; at least two observations, with a non-zero median absolute deviation. A sample more than half of whose values are tied at the median has MAD = 0 and no biweight midvariance.

Value

A list with components estimate (= zeta^2), zeta, med, mad, n_used, n and method.

Details

The MAD entering Y is the raw median absolute deviation, not the rescaled MADN; the 9 is the tuning constant that decides which points receive weight zero.

References

Wilcox, R. R. (2017). Modern Statistics for the Social and Behavioral Sciences: A Practical Introduction, 2nd edn. CRC Press, Box 2.1, equation (2.12), p.31.

Examples

Bimid(c(-1, 0, 1))$zeta
#> [1] 0.8373877