06-16-2014 03:40 PM
Get your data into the events/trials syntax, if it is not already. Apply a logit transform to the dependent variable, and run GLMSELECT with the LASSO option.
04-30-2015 10:19 AM
Lasso variable selection is available for logistic regression in the latest version of the HPGENSELECT procedure (SAS/STAT 13.1 included in Base SAS 9.4).
Elastic net isn't supported quite yet. However if you're interested I can send you my Base SAS coding solution for lasso + elastic net for logistic and Poisson regression which I just presented at the 2015 SAS Global Forum.
05-06-2015 12:53 PM
Found it. Thanks! I will give it a try.
Google also found another suggestion for use of GLMSELECT. Code dichotomous outcome as +-1, run GLMSELECT and apply cutoff > 0. Will give that a try as well.
05-06-2015 02:34 PM
You're welcome, let me know if you have questions about the program.
The code will generate & output logistic regression coefficient estimates for selected values of the alpha & lambda parameters, but I haven't yet written code that selects the optimal alpha & lambda values for the elastic net model. You could do this using 5 or 10-fold cross validation, or else randomly split your data into two chunks, training and validation. Fit the elastic net models for varying alpha & lambda values with the training data, then score the validation dataset with the output model coefficients & compare predictive accuracy.
I haven't tried the GLMSELECT shortcut using +1/-1 but would be interested to see how it performs.
07-01-2015 04:33 PM
I also need to use LASSO in logistic regression model in SAS and my SAS version doesn't have HPGENSELECT procedure. Could you mind sending me the link of your Base SAS coding solution for lasso for logistic and Poisson regression presented at the 2015 SAS Global Forum?
Thank you very much and I appreciate your help!