Learn R Programming

rQCC (version 0.19.8.2)

unbiased.mad: Unbiased MAD (median absolute deviation) estimate

Description

Calculates the unbiased median absolute deviation(MAD) estimate under the normal distribution which is adjusted by the Fisher-consistency and finite-sample correction factors.

Usage

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

Arguments

x

a numeric vector of observations.

center

Optionally, the centre: defaults to the median.

constant

Correction factor for the Fisher-consistency under the standard normal distribution

na.rm

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

Value

mad.unbiased returns a numeric value.

Details

The unbiased median absolute deviation(MAD) is defined as the stats::mad divided by \(c_5(n)\), where the bias-correction factor with a sample of finite size, \(c_5(n)\), is calculated by rQCC::c4.factor with method="mad" option. The default value (constant=1.4826) ensures the Fisher-consistency under the standard normal. Note that the original median absolute deviation(MAD) was proposed by Hampel (1974).

References

Park, C., H. Kim, and M. Wang (2019). Finite-sample properties of robust location and scale estimators. arXiv:1908.00462.

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

See Also

rQCC::c4.factor for finite-sample correction factor for the standard deviation under the normal distribution.

rQCC::shamos for robust Fisher-consistent estimator for the standard deviation of a normal distribution.

rQCC::shamos.unbiased for robust finite-sample unbiased estimator for the standard deviation of a normal distribution.

stats::mad for calculating the sample median absolute deviation (MAD).

rQCC::finite.breakdown for calculating the finite-sample breakdown point.

Examples

Run this code
# NOT RUN {
x = c(0:10, 50)

# Unbiased median absolute deviation(MAD)
mad.unbiased(x)

# Fisher-consistent median absolute deviation(MAD)
mad(x)
# }

Run the code above in your browser using DataLab