add1.lmRob {robust}R Documentation

Add Terms to a Robust Linear Model Object

Description

add1.lmRob is used to investigate an lmRob object by adding to it, in turn, each of a number of specified terms.

Usage

## S3 method for class 'lmRob':
add1(object, scope=. ~ ., scale, keep, ...)

Arguments

object an lmRob object.
scope a formula object describing the terms to be added. This argument is required, and is parsed to produce a set of terms that may be added to the model on their own without breaking the hierarchy rules. The scope can also be a character vector of term labels. Any "." in scope is interpreted relative to the formula implied by the object argument.
scale an estimate of the scale of the residuals. If not supplied, the initial estimate of the scale in object is used.
keep a character vector of names of components that should be saved for each augmented model. Only names from the set "coefficients", "fitted" and "residuals" are allowed. If keep is TRUE, the complete set is implied. The default behavior is not to keep anything.
... additional arguments required by the generic add1 function.

Details

An anova object is constructed, consisting of the term labels, the degrees of freedom, and Robust Final Prediction Errors (RFPE) for each superset model.

This function implements the generic function add1 for lmRob class objects.

Value

if keep is missing, an anova object corresponding to each superset model implied by object and scope; otherwise, a list with components:

anova an anova object corresponding to each superset model implied by object and scope.
keep a matrix of mode "list", with a column for each superset model, and a row for each component kept.
... additional arguments required by the generic add1 function.

See Also

lmRob, add1, anova, drop1, lmRob.object.

Examples

data(stack.dat)
stack.rob <- lmRob(Loss ~ Water.Temp, data = stack.dat) 
add1(stack.rob, . ~ . + Air.Flow + Acid.Conc.) 

[Package robust version 0.3-4 Index]