predict-matrix-slp: Create model matrix for prediction, for model using slp...

Description Usage Arguments Details Value See Also

Description

Re-generate the basis matrix for a particular N, W Slepian sequence family member, with the additional property that the smoother captures/passes constants without distortion. Simply re-arranges object. Not intended to be used directly by user.

Usage

1
2
## S3 method for class 'slp.smooth'
Predict.matrix(object,data)

Arguments

object

a smooth specification object, usually generated by a model term s(..., bs = 'slp', ..., xt = list(...)), and for this type, requiring an additional xt = list() object containing parameters. For examples, see below.

data

a list containing just the data required by this term, with names corresponding to object[['term']]. Typically just a single time index array.

Details

Presumably because most basis sets are larger in size than their computational burden, mgcv passes objects around without including the actual basis vectors. For example, if using basis cr, the parameters are included in object, and then the bases re-computed as needed.

As the slp basis is significantly more computational in nature, the basis vectors are saved as part of the object. While mgcv deletes the main set of time-aligned vectors, this routine restores such vectors so that predict and plot work correctly.

Value

A corrected (re-assembled) version of object, which contains the X basis vectors in a format that can be used by predict or plot.

See Also

smooth.construct, Predict.matrix


slp documentation built on May 2, 2019, 2:39 a.m.