design.matrix {ruv} | R Documentation |
Design Matrix
Description
Creates a design matrix.
Usage
design.matrix(a, name = "X", remove.collinear = TRUE, include.intercept = TRUE)
Arguments
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. |
Details
Numerical vectors are not modified. Factors are converted to dummy variables. Character vectors are converted to factors, and then to dummy variables.
Value
A matrix.
Author(s)
Johann Gagnon-Bartsch johanngb@umich.edu
[Package ruv version 0.9.7.1 Index]