Description Usage Arguments Details Value Author(s) See Also Examples
Converts factors to dummies.
Note that with more than one level, BART needs a dummy for each level of a factor
(unlike in linear regression where one of the dummies is dropped).
1 2 3 |
x |
Data frame of explanatory variables. |
all |
If all=TRUE, a factor with p levels will be replaced by all p dummies. If all=FALSE, the pth dummy is dropped. |
Uses function class.ind from the nnet library. Note that if you have train and test data frames, it may be best to rbind the two together, apply makeind to the result, and then pull them back apart.
A matrix.
Numerical variables come first, and then the appended dummies.
Hugh Chipman: hugh.chipman@acadiau.ca
Robert McCulloch: robert.mcculloch@chicagogsb.edu.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.