predict()
on an
lmRob
Object
lmRob
object and returns a matrix of
predictions.
predict.lmRob(object, newdata, type = c("response", "terms"), se.fit = F, terms = labels(object))
lmRob
object.
newdata
.
"response"
(the default) or
"terms"
.
If
"response"
is selected, the predictions are on the scale of the
response. If
type="terms"
is selected, the predictions are broken down
into the contributions from each term. A matrix of predictions is produced,
one column for each term in the model.
TRUE
, pointwise standard errors are computed along with the predictions.
type="terms"
, the
terms=
argument can be used to specify which terms
should be included; the default is
labels(object)
.
se.fit = T
. If
type="terms"
, a matrix of
fitted terms is produced, with one column for each term in the model (or
subset of these if the
terms=
argument is used). There is no column for
the intercept, if present in the model, and each of the terms is centered
so that their average over the original data is zero. The matrix of fitted
terms has a
"constant"
attribute which, when added to the sum of these
centered terms, gives the additive predictor.
This function is a method for the generic function for class lmRob. It can be invoked by calling for an object x of the appropriate class, or directly by calling regardless of the class of the object.
predict
can produce incorrect predictions when the
newdata
argument
is used if the formula in
object
involves
data-dependenttransformations, such as
poly(Age, 3)
or
sqrt(Age - min(Age))
.