The various built in smooth classes for use with gam
have associate Predict.matrix
method functions to enable prediction from the fitted model.
# S3 method for cr.smooth
Predict.matrix(object, data)
# S3 method for cs.smooth
Predict.matrix(object, data)
# S3 method for cyclic.smooth
Predict.matrix(object, data)
# S3 method for pspline.smooth
Predict.matrix(object, data)
# S3 method for tensor.smooth
Predict.matrix(object, data)
# S3 method for tprs.smooth
Predict.matrix(object, data)
# S3 method for ts.smooth
Predict.matrix(object, data)
# S3 method for t2.smooth
Predict.matrix(object, data)
A matrix mapping the coeffients for the smooth term to its values at the supplied data values.
a smooth object, usually generated by a smooth.construct
method having
processed a smooth specification object generated by an s
or te
term in a
gam
formula.
A data frame containing the values of the (named) covariates at which the smooth term is to be
evaluated. Exact requirements are as for smooth.construct
and smooth.construct2
.
Simon N. Wood simon.wood@r-project.org
The Predict matrix function is not normally called directly, but is rather used internally by predict.gam
etc.
to predict from a fitted gam
model. See Predict.matrix
for more details, or the specific
smooth.construct
pages for details on a particular smooth class.
Wood S.N. (2017) Generalized Additive Models: An Introduction with R (2nd edition). Chapman and Hall/CRC Press.