get_modelmatrix: Model Matrix

View source: R/get_modelmatrix.R

get_modelmatrixR Documentation

Model Matrix

Description

Creates a design matrix from the description. Any character variables are coerced to factors.

Usage

get_modelmatrix(x, ...)

Arguments

x

An object.

...

Passed down to other methods (mainly model.matrix()).

Examples

data(mtcars)

model <- lm(am ~ vs, data = mtcars)
get_modelmatrix(model)

insight documentation built on Aug. 19, 2025, 1:12 a.m.