Creates a matrix of predictors appropriate for glm.spike models.
# S3 method for glm.spike
model.matrix(object, data = NULL, ...)
The matrix of predictors used at training time, so long as the original data used to fit the model is available in the frame where this function is called.
An object of class glm.spike
.
Either a data frame to use when building the model
matrix, or NULL
. If NULL
then the training data from
object
will be used.
Extra arguments passed to model.matrix.default
.
Steven L. Scott
glm.spike
objects do not store the predictors used to fit the
model. If the training data is modified between when object
is fit and when this function is called, the modifications will
be reflected in the returned value.
lm.spike