MAD: Median absolute deviation (MAD)

MADR Documentation

Median absolute deviation (MAD)

Description

Calculates the unbiased median absolute deviation (MAD) estimator and the unbiased squared MAD under the normal distribution which are adjusted by the Fisher-consistency and finite-sample unbiasing factors.

Usage

mad.unbiased (x, center = median(x), constant=1.4826, na.rm = FALSE)

mad2.unbiased(x, center = median(x), constant=1.4826, na.rm = FALSE)

Arguments

x

a numeric vector of observations.

center

pptionally, the center: defaults to the median.

constant

correction factor for the Fisher-consistency under the normal distribution

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds.

Details

The unbiased MAD (mad.unbiased) is defined as the mad{stats} divided by c5(n), where c5(n) is the finite-sample unbiasing factor. Note that c5(n) notation is used in Park et. al (2022), and c5(n) is calculated using the function c4.factor{rQCC} with estimator="mad" option. The default value (constant=1.4826) ensures the Fisher-consistency under the normal distribution. Note that the original MAD was proposed by Hampel (1974).

The unbiased squared MAD (mad2.unbiased) is defined as the squared mad{stats} divided by w5(n) where w5(n) is the finite-sample unbiasing factor. Note that w5(n) notation is used in Park et. al (2022), and w5(n) is calculated using the function w4.factor{rQCC} with estimator="mad2" option. The default value (constant=1.4826) ensures the Fisher-consistency under the normal distribution. Note that the square of the conventional MAD is Fisher-consistent for the variance (σ^2) under the normal distribution, but it is not unbiased with a sample of finite size.

Value

They return a numeric value.

Author(s)

Chanseok Park and Min Wang

References

Park, C., H. Kim, and M. Wang (2022). Investigation of finite-sample properties of robust location and scale estimators. Communications in Statistics - Simulation and Computation, 51, 2619-2645.
doi: 10.1080/03610918.2019.1699114

Hampel, F. R. (1974). The influence curve and its role in robust estimation. Journal of the American Statistical Association, 69, 383–393.

See Also

c4.factor{rQCC} for finite-sample unbiasing factor for the standard deviation under the normal distribution.

w4.factor{rQCC} for finite-sample unbiasing factor for the variance under the normal distribution.

shamos{rQCC} for robust Fisher-consistent estimator of the standard deviation under the normal distribution.

shamos.unbiased{rQCC} for robust finite-sample unbiased estimator of the standard deviation under the normal distribution.

mad{stats} for calculating the sample MAD.

finite.breakdown{rQCC} for calculating the finite-sample breakdown point.

Examples

x = c(0:10, 50)

# Fisher-consistent MAD, but not unbiased with a finite sample.
mad(x)

# Unbiased MAD.
mad.unbiased(x)

# Fisher-consistent squared MAD, but not unbiased.
mad(x)^2

# Unbiased squared MAD.
mad2.unbiased(x)

rQCC documentation built on Dec. 28, 2022, 1:49 a.m.

Related to MAD in rQCC...