Re: [R] Preparing dataset for glmnet: factors to dummies

2011-02-02 Thread Mark Difford
Hi Frank, >> I believe that glmnet scales variables by their standard deviations. >> This would not be appropriate for categorical predictors. That's an excellent point, which many are likely to forget (including me) since one is using a model matrix. The default argument is to standardize inpu

Re: [R] Preparing dataset for glmnet: factors to dummies

2011-02-01 Thread Frank Harrell
I believe that glmnet scales variables by their standard deviations. This would not be appropriate for categorical predictors. Frank - Frank Harrell Department of Biostatistics, Vanderbilt University -- View this message in context: http://r.789695.n4.nabble.com/Preparing-dataset-for-glm

Re: [R] Preparing dataset for glmnet: factors to dummies

2011-02-01 Thread Martin Maechler
> "NS" == Nick Sabbe > on Tue, 1 Feb 2011 10:46:01 +0100 writes: NS> Hello list. NS> For some reason, the makers of glmnet do not accept a dataframe as input. NS> They expect the input to be a matrix, where the dummies are already NS> precoded. NS> Now I have crea

[R] Preparing dataset for glmnet: factors to dummies

2011-02-01 Thread Nick Sabbe
Hello list. For some reason, the makers of glmnet do not accept a dataframe as input. They expect the input to be a matrix, where the dummies are already precoded. Now I have created a sample dataset with . 11 factor columns with two levels . 4 factor columns with three levels . 135 continuous col