smoothm is an interface for all the smoothed
M-estimators introduced in Hampel, Hennig and Ronchetti (2011) for
one-dimensional location, the Huber- and Bisquare-M-estimator and the
ML-estimator of the Cauchy distribution, calling all the other
functions documented on this page.
smoothm(y, method="smhuber",
k=0.862, sn=sqrt(2.046/length(y)),
tol=1e-06, s=mad(y), init="median") sehuber(y, k = 0.862, tol = 1e-06, s=mad(y), init="median")
smhuber(y, k = 0.862, sn=sqrt(2.046/length(y)), tol = 1e-06, s=mad(y),
smmed=FALSE, init="median")
mbisquare(y, k=4.685, tol = 1e-06, s=mad(y), init="median")
smbisquare(y, k=4.685, tol = 1e-06, sn=sqrt(1.0526/length(y)),
s=mad(y), init="median")
mlcauchy(y, tol = 1e-06, s=mad(y))
smcauchy(y, tol = 1e-06, sn=sqrt(2/length(y)), s=mad(y))
numeric vector. Data set.
one of "huber", "smhuber",
"bisquare", "smbisquare", "cauchy",
"smcauchy", "smmed". See details.
numeric. Tuning constant. This is used for method one of
"huber", "smhuber", "bisquare", "smbisquare"
in smoothm and the corresponding functions.
Tuning constants are defined for the Huber- and Bisquare M-estimator
as in Maronna et al. (2006). The default values refer to a Huber
M-estimator which is optimal under 20% contamination (0.862) and
to a Bisquare M-estimator with 95% efficiency under the Gaussian
model (4.685).
numeric. This is used for method one of
"smhuber", "smbisquare", "smcauchy", "smmed". This is the
smoothing standard error \(\sigma_n\) in Hampel et al. (2011) depending
on the sample size and the asymptotic variance of the base
estimator. The default value of smoothm and smhuber
is based on a Huber estimator with k=0.862 under Huber's
least favourable distribution for which it is ML. The default value of
smbisquare is based on the Bisquare estimator with
k=4.685 under the Gaussian distribution. The default value of
smcauchy is based on the Cauchy ML estimator under the Cauchy
distribution. A value that can be used for the smoothed median is
sqrt(1.056/length(y)), which is based on the median under the
double exponential (Laplace) distribution with 1.4826 MAD=1. Note
that the distributional "assumptions" for these choices are by no
means critical; they should work well under many other distributions
as well.
numeric. Stopping criterion for algorithms (absolute difference between two successive values).
numeric. Estimated or assumed scale/standard deviation.
"median" or "mean". Initial estimator for
iteration. Ignored if method=="cauchy" or "smcauchy".
logical. If FALSE, the smoothed Huber estimator
is computed, otherwise the smoothed median by smhuber.
A list with components
the location estimator.
see above.
see above.
see above.
see above.
see above.
The following estimators can be computed (some computational details are given in Hampel et al. 2011):
method="huber" and function
sehuber compute the standard Huber estimator (Huber and
Ronchetti 2009). The only differences from huber are
that s and init can be specified and that the
default k is different.
method="smhuber" and function
smhuber compute the smoothed Huber estimator (Hampel et
al. 2011).
method="bisquare" and function
bisquare compute the bisquare M-estimator (Maronna et
al. 2006). This uses psi.bisquare.
method="smbisquare" and function
smbisquare compute the smoothed bisquare M-estimator (Hampel et
al. 2011). This uses psi.bisquare
method="cauchy"
and function mlcauchy compute the ML-estimator for the Cauchy
distribution.
method="smcauchy" and function
smcauchy compute the
smoothed ML-estimator for the Cauchy distribution (Hampel et
al. 2011).
method="smmed" and function
smhuber with median=TRUE compute the
smoothed median (Hampel et al. 2011).
Hampel, F., Hennig, C. and Ronchetti, E. (2011) A smoothing principle for the Huber and other location M-estimators. Computational Statistics and Data Analysis 55, 324-337.
Huber, P. J. and Ronchetti, E. (2009) Robust Statistics (2nd ed.). Wiley, New York.
Maronna, A.R., Martin, D.R., Yohai, V.J. (2006). Robust Statistics: Theory and Methods. Wiley, New York
# NOT RUN {
library(MASS)
set.seed(10001)
y <- rdoublex(7)
median(y)
huber(y)$mu
smoothm(y)$mu
smoothm(y,method="huber")$mu
smoothm(y,method="bisquare",k=4.685)$mu
smoothm(y,method="smbisquare",k=4.685,sn=sqrt(1.0526/7))$mu
smoothm(y,method="cauchy")$mu
smoothm(y,method="smcauchy",sn=sqrt(2/7))$mu
smoothm(y,method="smmed",sn=sqrt(1.0526/7))$mu
smoothm(y,method="smmed",sn=sqrt(1.0526/7),init="mean")$mu
# }
Run the code above in your browser using DataLab