Description Usage Arguments Details Value Author(s)
Creates a design matrix.
1 | design.matrix(a, name = "X", remove.collinear = TRUE, include.intercept = TRUE)
|
a |
Object from which to create a design matrix. Can be a vector, matrix, factor, or dataframe. |
name |
Name of the design matrix. Used to name columns that aren't already named (e.g. X1, X2, etc.) |
remove.collinear |
Will remove columns that are collinear, to ensure the design matrix is full rank. |
include.intercept |
Add an intercept to the matrix if one is not included already. |
Numerical vectors are not modified. Factors are converted to dummy variables. Character vectors are converted to factors, and then to dummy variables.
A matrix.
Johann Gagnon-Bartsch johanngb@umich.edu
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.