powered by
make_matrices
Build the prediction design matrix based on new data and model_matrices object created by make_matrices
pred_matrix(model_matrices, newdata)
prediction design matrix for newdata with the same basis as used for model_matrices
newdata
model_matrices
model_matrices object as returned from make_matrices
data frame containing the variables in the formula and new data for which to evaluate the basis
modmat = make_matrices(~ s(x), data.frame(x = 1:10)) Z_predict = pred_matrix(modmat, data.frame(x = 1:10 - 0.5))
Run the code above in your browser using DataLab