Algorithm A is an implementation of Huber's location and scale estimate with iterated scale.
algA(x, k = 1.5, na.rm = FALSE, tol = .Machine$double.eps^0.25,
maxiter = 25, verbose = FALSE)
Robust estimate of location
Robust estimate of scale
numeric vector or array of values.
Tuning factor; Winsorisation occurs ar k standard deviations.
a logical value indicating whether NA
values should be
removed before the computation proceeds.
Convergence tolerance Iteration continues until the relative
change in estimated sd drops below tol
.
Maximum number of iterations permitted.
Controls information displayed during iteration; see Details.
S L R Ellison s.ellison@lgcgroup.com
Algorithm A uses the corrected median absolute deviation as the initial
estimate of scale; an error is returned if the resulting scale estimate is
zero, which can occur with over 50% of the data set equal. huberM
in
the robustbase package uses an alternative scale estimate in these
circumstances.
Algorithm A is the robust estimate of location described in ISO 5725-5:1998. It proceeds by winsorisation and re-estimation of scale and location.
The argument k
controls the point at which values are Winsorised
and hence controls the efficiency. At k=1.5
, the value chosen by
ISO 5725, the estimator has asymptotic efficiency at the Normal of 0.964.
With iterated estimate of scale and k=1.5
, the estimator has a
breakdown point of about 30
The convergence criterion for Algorithm A is not specified in ISO 5725-5:1998.
The criterion chosen here is reasonably stringent but the results will differ
from those obtained using other choices. Use verbose=2
to check the
effect of different tolerance or maximum iteration count.
If verbose
is non-zero, the current iteration number
and estimate are printed; if verbose>1
, the current set
of truncated values
ISO 5725-5:1998 Accuracy (trueness and precision) of measurement methods and results - Part 5: Alternative methods for the determination of the precision of a standard measurement method
Maronna R A, Martin R D, Yohai V J (2006) Robust statistics - theory and methods. Jhn Wiley and Sons, West Sussex, England.
algS
, hubers
, huberM
#Creosote example from ISO 5725-5:1998
#Means for each group are:
cm <-c(24.140, 20.155, 19.500, 20.300, 20.705, 17.570, 20.100, 20.940, 21.185)
algA(cm, verbose=TRUE)
#Iteration 4 corresponds very closely to the ISO 5725 answer
Run the code above in your browser using DataLab