RobStatTM (version 1.0.2)

lmrobdetMM: Robust linear regression estimators

Description

This function computes an MM-regression estimators for linear models using deterministic starting points.

Usage

lmrobdetMM(formula, data, subset, weights, na.action, model = TRUE,
  x = !control$compute.rd, y = FALSE, singular.ok = TRUE,
  contrasts = NULL, offset = NULL, control = lmrobdet.control())

Arguments

formula

a symbolic description of the model to be fit.

data

an optional data frame, list or environment containing the variables in the model. If not found in data, model variables are taken from environment(formula), which usually is the root environment of the current R session.

subset

an optional vector specifying a subset of observations to be used.

weights

an optional vector of weights to be used in the fitting process.

na.action

a function to indicates what should happen when the data contain NAs. The default is set by the na.action setting of options, and is na.fail if that is unset.

model

logical value indicating whether to return the model frame

x

logical value indicating whether to return the model matrix

y

logical value indicating whether to return the vector of responses

singular.ok

logical value. If FALSE a singular fit produces an error.

contrasts

an optional list. See the contrasts.arg of model.matrix.default.

offset

this can be used to specify an a priori known component to be included in the linear predictor during fitting. An offset term can be included in the formula instead or as well, and if both are specified their sum is used.

control

a list specifying control parameters as returned by the function lmrobdet.control.

Value

A list with the following components:

coefficients

The estimated vector of regression coefficients

scale

The estimated scale of the residuals

residuals

The vector of residuals associated with the robust fit

converged

Logical value indicating whether IRWLS iterations for the MM-estimator have converged

iter

Number of IRWLS iterations for the MM-estimator

rweights

Robustness weights for the MM-estimator

fitted.values

Fitted values associated with the robust fit

rank

Numeric rank of the fitted linear model

cov

The estimated covariance matrix of the regression estimates

df.residual

The residual degrees of freedom

contrasts

(only where relevant) the contrasts used

xlevels

(only where relevant) a record of the levels of the factors used in fitting

call

the matched call

model

if requested, the model frame used

x

if requested, the model matrix used

y

if requested, the response vector used

na.action

(where relevant) information returned by model.frame on the special handling of NAs

Details

This function computes MM-regression estimators computed using Pen~a-Yohai candidates (instead of subsampling ones). This function makes use of the functions lmrob.fit, lmrob..M..fit, .vcov.avar1, lmrob.S and lmrob.lar, from robustbase, along with utility functions used by these functions, modified so as to include use of the analytic form of the optimal psi and rho functions (for the optimal psi function , see Section 5.8.1 of Maronna, Martin, Yohai and Salibian Barrera, 2019)

References

http://www.wiley.com/go/maronna/robust

See Also

DCML, MMPY, SMPY

Examples

Run this code
# NOT RUN {
data(coleman, package='robustbase')
m2 <- lmrobdetMM(Y ~ ., data=coleman)
m2
summary(m2)

# }

Run the code above in your browser using DataCamp Workspace