location.lms
uses the exact algorithm of Rousseeuw and Leroy (1987,
pages 169-170).
location.lms(xvec, minquan=floor(length(xvec)/2)
vector
containing the observations of which the location has to be
determined.
Missing values (
NA
s) and Infinite values (
Inf
s) are not accepted.
Let
n
be the number of observations. The method of the shortest half
estimates univariate location. The location
estimator is defined as the midpoint of the "shortest"
half of the data. The scale estimator is essentially the length
of that half, as proposed by Rousseeuw and Leroy (1988).
A "half" means
minquan + 1
observations of the data points.
First the observations are ordered. The lengths
of the successive halves
are computed. (Note that not all halves have to be considered
because the observations are ordered.) For the
location estimate, the center of the shortest half is
returned. If there are several shortest, the low median of their
centers is returned. For the scale estimate the length (which is always
unique) of the shortest half is returned.
The univariate location and scale estimator can be considered
as a particular case of the general regression model.
The method of the shortest half
is a special case of
lmsreg
. Also the minimum
volume ellipsoid estimator reduces to the shortest half in one
dimension.
This location estimator's breakdown value is 50%. That is, the estimate cannot be pulled arbitrarily far away without changing about half of the data.
Rousseeuw, P.J. and Leroy, A.M. (1987).
Robust Regression and Outlier Detection.
New York: Wiley.
Rousseeuw, P.J. and Leroy, A.M. (1988).
A Robust Scale Estimator Based on the Shortest Half.
Statistica Neerlandica,
42, 103-116.
x <- c(90,93,86,92,95,83,75,40,88,80) sort(x) mean(x) median(x) location.lms(x)