pred_matrix: Build the prediction design matrix based on new data and model_matrices object created by modmat
Description
Deprecated. Use predict on the object returned by modmat instead, which does the same thing:
predict(modmat, newdata) in place of pred_matrix(modmat, newdata).
Usage
pred_matrix(model_matrices, newdata, what = NULL, exclude = NULL)
Value
prediction design matrix for newdata with the same basis as used for model_matrices
Arguments
model_matrices
model_matrices object as returned from modmat
newdata
data frame containing the variables in the formula and new data for which to evaluate the basis
what
optional character string specifying which formula to use for prediction if model_matrices contains multiple formulas.
exclude
optional vector of terms to set to zero in the predicted design matrix. Useful for predicting main effects only when e.g. s(..., bs = "re") terms are present. See mgcv::predict.gam for more details.