Prepares a matrix for regression from a data frame
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 !! ----
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.