View source: R/DataFrame2Matrix4Regression.R
DataFrame2Matrix4Regression | R Documentation |
Prepares a matrix for regression from a data frame
DataFrame2Matrix4Regression(X, last = TRUE, Intercept = FALSE)
X |
A data frame |
last |
Logical to use the last category of nominal variabless as baseline. |
Intercept |
Logical to tell the function if a constant must be present |
Nominal variables are converted to a matrix of dummy variables for regression.
A matrix ready to use as independent variables in a regression
Jose Luis Vicente Vilardon
##---- Should be DIRECTLY executable !! ----
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.