model.matrix.tramnet: model.matrix method for class '"tramnet"'

View source: R/methods.R

model.matrix.tramnetR Documentation

model.matrix method for class "tramnet"

Description

model.matrix method for class "tramnet", returning the (scaled) design matrix of the penalized covariates

Usage

## S3 method for class 'tramnet'
model.matrix(object, newdata, ...)

Arguments

object

object of class "tramnet"

newdata

optional data frame. For models fitted via the formula interface, the design matrix is computed from newdata and scaled as the training data. Not available for models fitted via the default interface

...

additional arguments are ignored

Value

Numeric matrix of covariates as used for fitting object (default) or computed from newdata

Author(s)

Lucas Kook


tramnet documentation built on Oct. 16, 2026, 5:07 p.m.