Flags rows whose distance from a robust center exceeds sqrt(qchisq(q, p));
center and scatter default to the minimum volume ellipsoid (Mvedet).
Usage
OutMah(X, center = NULL, scatter = NULL, q = 0.975)
Arguments
- X
Numeric matrix.
- center, scatter
Optional robust center and scatter.
- q
Chi-squared quantile.
Value
list(outliers (0-based), distance, crit).
References
Wilcox, R. R. (2017). Modern Statistics for the Social and
Behavioral Sciences, 2nd ed. Eq (13.2).
Examples
OutMah(rbind(c(0, 0), c(1, 0), c(0, 1), c(9, 9)), center = c(0, 0), scatter = diag(2))$outliers
#> [1] 3