Learn R Programming

insight (version 0.18.6)

get_modelmatrix: 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

Run this code
data(mtcars)

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

Run the code above in your browser using DataLab