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.
mad.unbiased (x, center = median(x), constant=1.4826, na.rm = FALSE)mad2.unbiased(x, center = median(x), constant=1.4826, na.rm = FALSE)
They return a numeric value.
a numeric vector of observations.
pptionally, the center: defaults to the median.
correction factor for the Fisher-consistency under the normal distribution
a logical value indicating whether NA values should be stripped before the computation proceeds.
Chanseok Park and Min Wang
The unbiased MAD (mad.unbiased
)
is defined as the mad{stats} divided by \(c_5(n)\),
where \(c_5(n)\) is the finite-sample unbiasing factor.
Note that \(c_5(n)\) notation is used in Park et. al (2022),
and \(c_5(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 \(w_5(n)\) where
\(w_5(n)\) is the finite-sample unbiasing factor.
Note that \(w_5(n)\) notation is used in Park et. al (2022),
and \(w_5(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 (\(\sigma^2\)) under the normal distribution, but
it is not unbiased with a sample of finite size.
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.
tools:::Rd_expr_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.
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.
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)
Run the code above in your browser using DataLab