powered by
This is a thin wrapper around stats::model.matrix() which returns a tibble. Use it to determine how your modelling formula is translated into a matrix, an thence into an equation.
stats::model.matrix()
model_matrix(data, formula, ...)
A data frame
A modelling formula
Other arguments passed onto stats::model.matrix()
A tibble.
# NOT RUN { model_matrix(mtcars, mpg ~ cyl) model_matrix(iris, Sepal.Length ~ Species) model_matrix(iris, Sepal.Length ~ Species - 1) # }
Run the code above in your browser using DataLab