Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

model.matrix.mars

Produce a Design Matrix from a ‘mars’ Object


Description

Produce a design matrix from a ‘mars’ object.

Usage

## S3 method for class 'mars'
model.matrix(object, x, which, full = FALSE, ...)

Arguments

object

a mars object.

x

optional argument; if supplied, the mars basis functions are evaluated at these new observations.

which

which columns should be used. The default is to use the columns described by the component selected.terms on object.

full

if TRUE the entire set of columns are selected, even redundant ones. This is used for updating a mars fit.

...

further arguments to be passed from or to methods.

Value

A model matrix corresponding to the selected columns.

See Also


mda

Mixture and Flexible Discriminant Analysis

v0.5-2
GPL-2
Authors
S original by Trevor Hastie & Robert Tibshirani. Original R port by Friedrich Leisch, Kurt Hornik and Brian D. Ripley. Balasubramanian Narasimhan has contributed to the upgrading of the code.
Initial release
2020-06-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.