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:

add1.lmRob(object, scope=. ~ ., scale, keep, x=NULL, ...) 

REQUIRED 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.

OPTIONAL ARGUMENTS:

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.
x
a model matrix that includes all the terms in object as well as all those to be added.

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.

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 is a method for the generic function add1 for class "lmRob" . It can be invoked by calling add1 for an object of the appropriate class, or directly by calling add1.lmRob regardless of the class of the object.

SEE ALSO:

, , , .

EXAMPLES:

stack.df <- data.frame(Loss=stack.loss,stack.x) 
stack.rob <- lmRob(Loss~Water.Temp+Acid.Conc., data=stack.df, 
                   robust.control=lmRob.robust.control(final="MM")) 
add1(stack.rob, .~.+Air.Flow)