model.matrix.glm.spike: Construct Design Matrices

View source: R/model.matrix.R

model.matrix.glm.spikeR 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


BoomSpikeSlab documentation built on May 29, 2024, 5:07 a.m.