Extract the robust scale estimate of the residuals from a robust regression model.
getScale(x, ...)# S3 method for seqModel
getScale(x, s = NA, ...)
# S3 method for sparseLTS
getScale(x, s = NA, fit = c("reweighted", "raw", "both"), ...)
A numeric vector or matrix giving the robust residual scale estimates for the requested model fits.
the model fit from which to extract the robust residual scale estimate.
additional arguments to be passed down to methods.
for the "seqModel"
method, an integer vector giving
the steps of the submodels for which to extract the robust residual scale
estimate (the default is to use the optimal submodel). For the
"sparseLTS"
method, an integer vector giving the indices of the
models from which to extract the robust residual scale estimate. If
fit
is "both"
, this can be a list with two components, with
the first component giving the indices of the reweighted fits and the second
the indices of the raw fits. The default is to use the optimal model for
each of the requested estimators. Note that the optimal models may not
correspond to the same value of the penalty parameter for the reweighted
and the raw estimator.
a character string specifying from which fit to extract the
robust residual scale estimate. Possible values are "reweighted"
(the default) for the residual scale of the reweighted fit, "raw"
for
the residual scale of the raw fit, or "both"
for the residual scale
of both fits.
Andreas Alfons
Methods are implemented for models of class "lmrob"
(see
lmrob
), "lts"
(see
ltsReg
), "rlm"
(see
rlm
), "seqModel"
(see rlars
) and
"sparseLTS"
(see sparseLTS
). The default method
computes the MAD of the residuals.
AIC
, lmrob
,
ltsReg
, rlm
,
rlars
, sparseLTS
data("coleman")
fit <- lmrob(Y ~ ., data=coleman)
getScale(fit)
Run the code above in your browser using DataLab