gam
,
loess
.
preplot(object, newdata)
gam()
and
loess()
.
object
need be present by name in
newdata
.
newdata
.
The purpose of calling
preplot()
is to precompute information to be used
in the plot, without necessarily doing the plot at the same time.
The object returned differs depending on the kind of
fit (that is, on which method is being used), but in all cases can be given
directly to the
plot()
function.
This implies that a suitable plot method has been written for whatever
class of object
preplot()
returns.
Saves the confidence intervals and fit for future plotting by
plot()
.
gam.object <- gam(Kyphosis ~ s(Age,4) + Number, family = binomial, data = kyphosis) preob <- preplot(gam.object) plot(preob, resid = T, se = T)