Skip to contents

morie_madn is the book's MADN, MAD / 0.6745. morie_mad_rescaled uses R's mad() constant 1.4826, which is what WRS relies on – the two differ in the fifth significant figure and the estimators ported from WRS use the R one. morie_mad_median_rule is the Hampel identifier of eq. (2.14): declare X an outlier when |X - M| / MADN > 2.24.

Usage

morie_mad(x)

morie_madn(x)

morie_mad_rescaled(x, constant = 1.4826)

morie_mad_median_rule(x, crit = 2.24)

Arguments

x

numeric vector

constant

Argument constant; see Usage.

crit

Argument crit; see Usage.

Value

morie_mad, morie_madn, morie_mad_rescaled numbers; morie_mad_median_rule a list with median, madn, ratio, is_outlier, outliers, n_outliers

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_mad(V)
#> [1] 2