lmrob.M.S: M-S regression estimators

View source: R/lmrob.M.S.R

lmrob.M.SR Documentation

M-S regression estimators

Description

Computes an M-S-estimator for linear regression using the “M-S” algorithm.

Usage

lmrob.M.S(x, y, control, mf,
          split = splitFrame(mf, x, control$split.type))

Arguments

x

numeric matrix (a model.matrix) of the predictors.

y

numeric vector for the response

control

list as returned by lmrob.control.

mf

a model frame as returned by model.frame.

split

(optional) list as returned by splitFrame.

Details

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.

Value

A list with components

coefficients

numeric vector (length p) of M-S-regression coefficient estimates.

scale

the M-S-scale residual estimate

residuals

numeric vector (legnth n) of the residuals.

rweights

numeric vector (length n) of the robustness weights.

control

the same list as the control argument.

converged

Convergence status (always TRUE), needed for lmrob.fit.

descent.cov

logical with the true m_s_descent convergence status.

Author(s)

Manuel Koller

References

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.

See Also

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.

Examples

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")

robustbase documentation built on Sept. 27, 2024, 5:09 p.m.