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)

easystats/insight documentation built on Oct. 2, 2024, 8:19 a.m.