add1.lmRob {robust} | R Documentation |
add1.lmRob
is used to investigate an lmRob
object by adding to it, in turn, each of a number of specified terms.
## S3 method for class 'lmRob': add1(object, scope=. ~ ., scale, keep, ...)
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. |
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.
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. |
lmRob
,
add1
,
anova
,
drop1
,
lmRob.object
.
data(stack.dat) stack.rob <- lmRob(Loss ~ Water.Temp, data = stack.dat) add1(stack.rob, . ~ . + Air.Flow + Acid.Conc.)