Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

drop1.lmRob

Compute an Anova Object by Dropping Terms


Description

drop1.lmRob is used to investigate a robust Linear Model object by recomputing it, successively omitting each of a number of specified terms.

Usage

## S3 method for class 'lmRob'
drop1(object, scope, scale, keep, fast = FALSE, ...)

Arguments

object

an lmRob object.

scope

an optional formula object describing the terms to be dropped. Typically this argument is omitted, in which case all possible terms are dropped (without breaking hierarchy rules). The scope can also be a character vector of term labels. If the argument is supplied as a formula, any . is interpreted relative to the formula implied by the object argument.

scale

a single numeric value containing a residual scale estimate. If missing, the scale estimate in object is used.

keep

a character vector of names of components that should be saved for each subset model. Only names from the set "coefficients", "fitted" and "residuals" are allowed. If keep == TRUE, the complete set is saved. The default behavior is not to keep anything.

fast

a logical value. If TRUE the robust initial estimate (used when fitting each of the reduced models) is replaced by a weighted least squares estimate using the robust weights in object.

...

additional arguments required by the generic drop1 function.

Details

This function is a method for the generic function drop1 for class "lmRob".

Value

An anova object is constructed, consisting of the term labels, the degrees of freedom, and Robust Final Prediction Errors (RFPE) for each subset model. If keep is missing, the anova object is returned. If keep is present, a list with components "anova" and "keep" is returned. In this case, the "keep" component is a matrix of mode "list", with a column for each subset model, and a row for each component kept.

See Also

Examples

data(stack.dat)
stack.rob <- lmRob(Loss ~ ., data = stack.dat) 
drop1(stack.rob)

robust

Port of the S+ "Robust Library"

v0.5-0.0
GPL-2
Authors
Jiahui Wang, Ruben Zamar <ruben@stat.ubc.ca>, Alfio Marazzi <Alfio.Marazzi@inst.hospvd.ch>, Victor Yohai <vyohai@dm.uba.ar>, Matias Salibian-Barrera <matias@stat.ubc.ca>, Ricardo Maronna <maron@mate.unlp.edu.ar>, Eric Zivot <ezivot@u.washington.edu>, David Rocke <dmrocke@ucdavis.edu>, Doug Martin, Martin Maechler <maechler@stat.math.ethz.ch>, Kjell Konis <kjell.konis@me.com>.
Initial release
2020-03-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.