Compute the robust estimate of location for very small samples.
A numeric vector.
The scale, if known, can be used to enhance the estimate for the location; defaults to unknown.
The maximum number of iterations; defaults to 60.
The desired accuracy.
Computes the M-estimator for location using the logistic ψ function of
Rousseeuw & Verboven (2002, 4.1). If there are three or fewer entries, the
function defaults to the
If the scale is known and passed through
scale, the algorithm uses the
suggestion in Rousseeuw & Verboven section 5 (2002), substituting the known
scale for the
NA values are stripped from
before computation takes place. If this is not done then an
NA value in
x will cause
mad to return
The tolerance and number of iterations are similar to those in existing base R functions.
Solves for the robust estimate of location, Tn, which is the solution to
mean(ψ((xi - Tn)/Sn)) = 0
where Sn is fixed at
mad(x). The ψ-function selected
by Rousseeuw & Verboven is:
ψ(x) = (exp(x) - 1) / (exp(x) + 1)
This is equivalent to
2 * plogis(x) - 1.
Avraham Adler Avraham.Adler@gmail.com
Rousseeuw, Peter J. and Verboven, Sabine (2002) Robust estimation in very small samples. Computational Statistics & Data Analysis, 40, (4), 741–758. doi: 10.1016/S0167-9473(02)00078-6
1 2 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.