Learn R Programming

scam (version 1.0)

Predict.matrix.mpi.smooth: Predict matrix method functions for SCAMs

Description

The various built in smooth classes for use with scam have associate Predict.matrix method functions to enable prediction from the fitted model.

Usage

## S3 method for class 'mpi.smooth':
Predict.matrix(object, data)
## S3 method for class 'mpd.smooth':
Predict.matrix(object, data)
## S3 method for class 'micx.smooth':
Predict.matrix(object, data)
## S3 method for class 'micv.smooth':
Predict.matrix(object, data)
## S3 method for class 'mdcx.smooth':
Predict.matrix(object, data)
## S3 method for class 'mdcv.smooth':
Predict.matrix(object, data)
## S3 method for class 'tedmd.smooth':
Predict.matrix(object, data)
## S3 method for class 'tedmi.smooth':
Predict.matrix(object, data)
## S3 method for class 'tesmd1.smooth':
Predict.matrix(object, data)
## S3 method for class 'tesmd2.smooth':
Predict.matrix(object, data)
## S3 method for class 'tesmi1.smooth':
Predict.matrix(object, data)
## S3 method for class 'tesmi2.smooth':
Predict.matrix(object, data)

Arguments

object
A smooth object, usually generated by a smooth.construct method having processed a smooth specification object generated by an s term in a scam formula.
data
A data frame containing the values of the named covariates at which the smooth term is to be evaluated.

Value

  • A matrix mapping the coefficients for the smooth term to its values at the supplied data values.

References

Pya, N. (2010) Additive models with shape constraints. PhD thesis. University of Bath. Department of Mathematical Sciences Wood S.N. (2006) Generalized Additive Models: An Introduction with R. Chapman and Hall/CRC Press.