Predict.matrix.sp.smooth: Constructor for predict matrix object.

Description Usage Arguments Details Value Author(s) References


Constructs prediction matrix for smooth classes used in gam, specifically by summary and predict.


    ## S3 method for class 'sp.smooth'
Predict.matrix(object, data)  



Object should be a gam smooth object, containing non-standard list elements 'mask' and 'W'. This object is usually constructed by a smooth.construct method having processed a smooth specification object generated by an s term in a gam formula.


A data frame containing the values of the named (time) covariate at which the smooth term is to be evaluated. Just as in smooth.construct, if data does not consist of a contiguous index series (in time), element 'mask' must be included as part of object. This is done by including xt=c() as a parameter to the 's' function call. See the examples below.


Requires that summary compute standard errors using frequentist approach, i.e. that the full original data set including missing values (tagged as NA) be passed. This is accomplished in practice by calling summary.gam as summary.gam(object, p.type=5, freq=TRUE). This is accomplished in this package by overloading the summary.gam function, so the user should not have to worry about this.

This function is not intended to be called directly by the user.


A matrix mapping the coeffients for the smooth term to its values at the supplied data values. Consists explicitly of an augmented Slepian basis matrix, subselected to the elements !$data).


Wesley Burr


Wood S.N. (2006) Generalized Additive Models: An Introduction with R. Chapman and Hall/CRC Press.

Wood, S.N. (2011) Fast stable restricted maximum likelihood and marginal likelihood estimation of semiparametric generalized linear models. Journal of the Royal Statistical Society - Series B (Applied Statistics), 73(1), 3-36.

Hastie, T.J. & Tibshirani, R.J. (1990) Generalized Additive Models. Chapman and Hall.

spsmooth documentation built on April 15, 2017, 2:51 a.m.