| gam_shell | R Documentation |
mgcv::predict.gam() with type = "lpmatrix" uses only the model
frame, the terms objects, the factor levels and contrasts, and the smooth
objects – all of which mgcv::gam(fit = FALSE) already produces. This
wraps that unfitted setup in something predict.gam() accepts, so that
a prediction matrix can be built without fitting anything.
gam_shell(G)
G |
Output of |
The coefficients are set to zero. predict.gam() requires the slot to
exist and to have the right length, but for type = "lpmatrix" it
returns the design matrix itself and never multiplies by them.
An object of class "gam", only usable for
predict(type = "lpmatrix")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.