Learn R Programming

robust (version 0.3-19)

add1.lmRob: 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 chara
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 c
...
additional arguments required by the generic add1 function.

Value

  • if keep is missing, an anova object corresponding to each superset model implied by object and scope; otherwise, a list with components:
  • anovaan anova object corresponding to each superset model implied by object and scope.
  • keepa 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.

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.

See Also

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

Examples

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

Run the code above in your browser using DataLab