
This function computes a robust regression estimator for a linear models with fixed designs.
lmrobM(
formula,
data,
subset,
weights,
na.action,
model = TRUE,
x = FALSE,
y = FALSE,
singular.ok = TRUE,
contrasts = NULL,
offset = NULL,
control = lmrobM.control()
)
A list with the following components:
The estimated vector of regression coefficients
The estimated scale of the residuals
The vector of residuals associated with the robust fit
Logical value indicating whether IRWLS iterations for the MM-estimator have converged
Number of IRWLS iterations for the MM-estimator
Robustness weights for the MM-estimator
Fitted values associated with the robust fit
Numeric rank of the fitted linear model
The estimated covariance matrix of the regression estimates
The residual degrees of freedom
(only where relevant) the contrasts used
(only where relevant) a record of the levels of the factors used in fitting
the matched call
if requested, the model frame used
if requested, the model matrix used
if requested, the response vector used
(where relevant) information returned by model.frame on the special handling of NAs
a symbolic description of the model to be fit.
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.
an optional vector specifying a subset of observations to be used.
an optional vector of weights to be used in the fitting process.
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.
logical value indicating whether to return the model frame
logical value indicating whether to return the model matrix
logical value indicating whether to return the vector of responses
logical value. If FALSE
a singular fit produces an error.
an optional list. See the contrasts.arg
of model.matrix.default.
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.
a list specifying control parameters as returned by the function lmrobM.control.
Victor Yohai, vyohai@gmail.com, based on lmrob
This function computes robust regression estimators for linear
models with fixed designs. It computes an L1 estimator,
and uses it as a starting point to find a minimum of a
re-descending M estimator. The scale is set to a quantile of the
absolute residuals from the L1 estimator.
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)
data(shock)
cont <- lmrobM.control(bb = 0.5, efficiency = 0.85, family = "bisquare")
shockrob <- lmrobM(time ~ n.shocks, data = shock, control=cont)
shockrob
summary(shockrob)
Run the code above in your browser using DataLab