lmrob.M.S | R Documentation |
Computes an M-S-estimator for linear regression using the “M-S” algorithm.
lmrob.M.S(x, y, control, mf,
split = splitFrame(mf, x, control$split.type))
x |
numeric matrix (a |
y |
numeric vector for the response |
control |
|
mf |
a model frame as returned by |
split |
(optional) list as returned by |
This function is used by lmrob
and not intended to be
used on its own (because an M-S-estimator has too low efficiency
‘on its own’).
An M-S estimator is a combination of an S-estimator for the
continuous variables and an L1-estimator (i.e. an M-estimator with
\psi(t) = sign(t)
) for the categorical variables.
The S-estimator is estimated using a subsampling algorithm. If the
model includes interactions between categorical (factor
)
and continuous variables, the subsampling algorithm might fail. In
this case, one can choose to assign the interaction to the categorical
side of variables rather than to the continuous side. This can be
accomplished via the control argument split.type
or by
specifying split
, see splitFrame
.
Note that the return status converged
does not refer to the
actual convergence status. The algorithm used does not guarantee
convergence and thus true convergence is almost never reached. This
is, however, not a problem if the estimate is only used as initial
estimate part of an MM or SMDM estimate.
The algorithm sometimes produces the warning message “Skipping design matrix equilibration (dgeequ): row ?? is exactly zero.”. This is just an artifact of the algorithm and can be ignored safely.
A list with components
coefficients |
numeric vector (length |
scale |
the M-S-scale residual estimate |
residuals |
numeric vector (legnth |
rweights |
numeric vector (length |
control |
the same list as the |
converged |
Convergence status (always |
descent.cov |
|
Manuel Koller
Maronna, R. A., and Yohai, V. J. (2000). Robust regression with both continuous and categorical predictors. Journal of Statistical Planning and Inference 89, 197–214.
lmrob
; for a description of the available split types, see
splitFrame
.
lmRob
in package robust uses a version of
the M-S algorithm automatically when the formula contains factors.
Our version however follows Maronna and Yohai (2000) more closely.
data(education)
education <- within(education, Region <- factor(Region))
flm <- lm(Y ~ Region + X1 + X2 + X3, education)
x <- model.matrix(flm)
y <- education$Y # == model.response(model.frame(flm))
set.seed(17)
f.MS <- lmrob.M.S(x, y, control = lmrob.control(),
mf = model.frame(flm))
## The typical use of the "M-S" estimator -- as initial estimate :
fmMS <- lmrob(Y ~ Region + X1 + X2 + X3, education,
init = "M-S")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.