model.matrix.glm.spike {BoomSpikeSlab}R Documentation

Construct Design Matrices

Description

Creates a matrix of predictors appropriate for glm.spike models.

Usage

  ## S3 method for class 'glm.spike'
model.matrix(object, data = NULL, ...)

Arguments

object

An object of class glm.spike.

data

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.

Details

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.

Value

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.

Author(s)

Steven L. Scott

See Also

lm.spike


[Package BoomSpikeSlab version 1.2.6 Index]