Declare an observation an outlier when |x - M| / MADN > crit,
where M is the sample median, MADN = MAD / 0.6745 and
MAD is the unscaled median absolute deviation. Both M
and MADN have a breakdown point of 0.5, which is what lets this
rule survive the masking that defeats Outms.
Value
A list with components flag (0/1 per observation),
which (1-based positions), out_val, n_out,
center, scale, dis, crit, n,
estimate (= n_out) and method.
Details
The divisor is Wilcox's 0.6745, not R's stats::mad constant of
1.4826, so MADN here equals
stats::mad(x, constant = 1 / 0.6745); the two agree to about
seven significant digits.
The constant 2.24 is from Rousseeuw and van Zomeren (1990). Equation
(2.14) is the Hampel identifier, for which Hampel used 3.5 rather than
2.24; crit is exposed for that reason.
References
Wilcox, R. R. (2017). Modern Statistics for the Social and Behavioral Sciences: A Practical Introduction, 2nd edn. CRC Press, section 2.5.2, equation (2.14), p.33.
Rousseeuw, P. J. and van Zomeren, B. C. (1990). Unmasking multivariate outliers and leverage points. Journal of the American Statistical Association 85(411), 633-639.
