powered by
Prepares a matrix for regression from a data frame
DataFrame2Matrix4Regression(X, last = TRUE, Intercept = FALSE)
A matrix ready to use as independent variables in a regression
A data frame
Logical to use the last category of nominal variabless as baseline.
Logical to tell the function if a constant must be present
Jose Luis Vicente Vilardon
Nominal variables are converted to a matrix of dummy variables for regression.
##---- Should be DIRECTLY executable !! ----
Run the code above in your browser using DataLab