lmrobdetMM: Robust Linear Regression Estimators

View source: R/lmrobdet.R

lmrobdetMMR Documentation

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.

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

Value

A list with the following components:

coefficients

The estimated vector of regression coefficients

scale

The robust residual M-scale estimate using the final residuals from the converged iterated weighted least square (IRWLS) algorithm final estimate

residuals

The vector of residuals associated with the robust fit

loss

Value of the objective function at the final MM-estimator

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

degree.freedom

The residual degrees of freedom

scale.S

Minimum robust scale associated with the preliminary highly robust but inefficient S-estimator.

r.squared

The robust multiple correlation coefficient

adj.r.squared

The adjusted robust multiple correlation coefficient taking into account the degrees of freedom of each term

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

terms

The terms object used.

iters.py

The number of refinement iterations for each Pena-Yohai candidate for the S-estimator.

iters.const

The number of refinement iterations used to compute the estimator without covariates (to calculate the robust R^2).

assign

Used to separate continuous from categorical columns in the design matrix

na.action

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

Choice of Rho Loss Function

This is done by the user choice of family = "opt" or family = "mopt" in the function lmrobdet.control. As of RobStatTM Versopm 1.0.7, the opt and mopt rhos functions are calculated using polynomials, rather than using the standard normal error function (erf) as in versions of RobStatTM prior to 1.0.7. The numerical results one now gets with the opt or mopt choices will differ by small amounts from those in earlier RobStatTM versions. Users who wish to replicate results from releases prior to 1.0.7 may do so using the family arguments family = "optV0" or family = "moptV0". Note that the derivative of the rho loss function, known as the "psi" function, is not the derivative of the rho polynomial, instead it is still the optimal psi function referred to above.

Related Vignettes

For further details, see the Vignettes "Polynomial Opt and mOpt Rho Functions", and "Optimal Bias Robust Regression Psi and Rho".

Author(s)

Matias Salibian-Barrera, matias@stat.ubc.ca, based on lmrob from package robustbase

References

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

See Also

DCML, MMPY, SMPY

Examples

data(coleman, package='robustbase')
m2 <- lmrobdetMM(Y ~ ., data=coleman)
m2
summary(m2)


RobStatTM documentation built on Nov. 28, 2023, 1:11 a.m.