Qn {robustbase} | R Documentation |
Compute the robust scale estimator Qn, an efficient alternative to the MAD.
Qn(x, constant = 2.2219, finite.corr = missing(constant))
x |
numeric vector of observations. |
constant |
number by which the result is multiplied; the default achieves consisteny for normally distributed data. |
finite.corr |
logical indicating if the finite sample bias
correction factor should be applied. Default to TRUE unless
constant is specified. |
............ FIXME ........
a number, the Qn robust scale estimator, scaled to be consistent for σ^2 and i.i.d. Gaussian observatsions, optionally bias corrected for finite samples.
Original Fortran code:
Christophe Croux and Peter Rousseeuw rousse@wins.uia.ac.be.
Port to C and R: Martin Maechler, maechler@R-project.org
Rousseeuw, P.J. and Croux, C. (1993) Alternatives to the Median Absolute Deviation, Journal of the American Statistical Association 88, 1273–1283.
Christophe Croux and Peter J. Rousseeuw (1992)
Time-Efficient Algorithms for Two Highly Robust Estimators of Scale,
Computational Statistics, Vol. 1, ed. Dodge and Whittaker,
Physica-Verlag Heidelberg, 411–428;
also available from
http://win-www.uia.ac.be/u/statis/abstract/Timeff92.htm.
mad
for the ‘most robust’ but much less efficient
scale estimator; Sn
for a similar faster but less
efficient alternative; scaleTau2
.
set.seed(153) x <- sort(c(rnorm(80), rt(20, df = 1))) Qn(x) Qn(x, finite.corr = FALSE)