add1.lmRob
is used to investigate an
lmRob
object by adding to it, in
turn, each of a number of specified terms.
add1.lmRob(object, scope=. ~ ., scale, keep, x=NULL, ...)
lmRob
object.
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.
object
is used.
"coefficients"
,
"fitted"
and
"residuals"
are allowed. If
keep
is
TRUE
, the complete set is implied.
The default behavior is not to keep anything.
object
as well as all those
to be added.
keep
is missing, an
anova
object corresponding to each superset model
implied by
object
and
scope
; otherwise, a list with components:
anova
object corresponding to each superset model implied by
object
and
scope
.
"list"
, with a column for each superset model, and a row
for each component kept.
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.
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)