Learn R Programming

robustHD (version 0.3.0)

getScale: Extract the residual scale of a robust regression model

Description

Extract the robust scale estimate of the residuals from a robust regression model.

Usage

getScale(x, ...)

  ## S3 method for class 'sparseLTS':
getScale(x, s = NA,
    fit = c("reweighted", "raw", "both"), ...)

Arguments

x
the model fit from which to extract the robust residual scale estimate.
s
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 th
fit
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
...
additional arguments to be passed down to methods.

Value

  • A numeric vector or matrix giving the robust residual scale estimates for the requested model fits.

Details

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.

See Also

AIC, lmrob, ltsReg, rlm, rlars, sparseLTS

Examples

Run this code
data("coleman")
fit <- lmrob(Y ~ ., data=coleman)
getScale(fit)

Run the code above in your browser using DataLab