rlm(x, ...) rlm.formula(formula, data, weights, ..., subset, na.action = na.fail, method = c("M", "MM", "model.frame"), wt.method = c("case", "inv.var"), model = TRUE, x.ret = TRUE, y.ret = FALSE, contrasts = NULL) rlm.default(x, y, weights, ..., w = rep(1, nrow(x)), init, psi = psi.huber, scale.est, k2 = 1.345, method = c("M", "MM"), wt.method = c("case", "inv.var"), maxit = 20, acc = 1e-4, test.vec = "resid")
y ~ x1 + x2 + ...
.
formula
are
preferentially to be taken.
NA
s are found. The
default action is for the procedure to fail. An alternative is
na.omit
, which leads to omission of cases with missing values on any
required variable.
x
.
lm
.
coef
component. Known
methods are
"ls"
(the default) for an initial least-squares fit
using weights
w*weights
, and
"lqs"
for an unweighted least-trimmed
squares fit with 200 samples.
g(x, ..., deriv)
that for
deriv=0
returns psi(x)/x and for
deriv=1
returns psi(x). Tuning constants
will be passed in via
...
.
rlm.default
or to the
psi
function.
"rlm"
inheriting from
"lm"
.
The additional components not in an
lm
object are
Fitting is done by iterated re-weighted least squares (IWLS).
Psi functions are supplied for the Huber, Hampel and Tukey bisquare
proposals as
psi.huber
,
psi.hampel
and
psi.bisquare
. Hubers corresponds to a convex optimization
problem and gives a unique solution (up to collinearity). The other
two will have multiple local minima, and a good starting point is
desirable.
Selecting
method = "MM"
selects a specific set of options which
ensures that the estimator has a high breakdown point. The initial set
of coefficients and the final scale are selected by an S-estimator
with
k0 = 1.548
; this gives (for n >> p) breakdown point 0.5.
The final estimator is an M-estimator with Tukey's biweight and fixed
scale that will inherit this breakdown point provided
c > k0
;
this is true for the default value of
c
that corresponds to
95% relative efficiency at the normal.
P. J. Huber (1981)
Robust Statistics.
Wiley.
F. R. Hampel, E. M. Ronchetti, P. J. Rousseeuw and W. A. Stahel (1986)
Robust Statistics: The Approach based on Influence Functions.
Wiley.
A. Marazzi (1993)
Algorithms, Routines and S Functions for Robust Statistics..
Wadsworth & Brooks/Cole.
stackloss <- data.frame(stack.x, stack.loss) summary(rlm(stack.loss ~ ., stackloss)) rlm(stack.loss ~ ., stackloss, psi = psi.hampel, init = "lts") rlm(stack.loss ~ ., stackloss, psi = psi.bisquare)