06-17-2015 08:51 AM
I don't know what version of SAS/STAT you are using, but if it is 13.2 (the documentation I have open right now), it says that the default optimization technique with less than 40 parameters in PROC LOGISTIC is Newton-Raphson with ridging. Can you supply some details on the model and proposed analysis to see if you need to invoke the TECHNIQUE= option in either the MODEL statement or the NLOPTIONS statement?
06-22-2015 04:09 AM
Thanks for reply!
I use SAS/STAT 13.2.
What I want to perform is a penalized logistic regression in SAS (penaliz/shrink the size of the regression coefficients). There are different models for this (RIDGE, LASSO) and I have found this function in linear regression in SAS (PROC REG) but not in logistic regression (PROC LOGISTIC).
Very helpful if you can give input how this can be done with in SAS
06-22-2015 11:47 AM
I am not aware of this functionality in a SAS procedure, certainly not in LOGISTIC or GENMOD. Maybe there are tricks to get this. Someone might have written a macro (certainly doable), but a quick search did not reveal anything.
06-22-2015 01:31 PM
The next release of SAS/STAT (14.1) will provide LASSO techniques in PROC HPGENSELECT, which will be what you are looking for, I think. It should be available later this year, if that helps at all.
06-23-2015 05:01 AM
I found a paper using shrinkage techniques in proc logistic "SUGI29-A new strategy of model buildning in proc logistic with automatic variable selection, validation, shrinkage and model averaging"
The paper says (on page 6):
"Shrunken regression coefficients are calculated by multiplication by the shrinkage factors (4) and (7). Note that 2logL(M) and 2logL(0) are the elements of the standard output of the SAS PROC LOGISTIC. So the heuristic linear shrinkage discussed above can be easily implemented in SAS PROC LOGISTIC by using ODS."
I am not so familiar with ODS and how this can be implemented in PROC LOGISTIC using ODS. Can you add your own formulas using ODS?
Unfortunately, the paper did not post any sas code examples.
Thanks for any help here!
06-23-2015 11:21 AM
Add the following to your PROC LOGISTIC code:
ods output fitstatistics=fitstatistics:
This will create a dataset that gives -2 log-likelihood values for each step in the stepwise procedure. -2log(M) is the log likelihood associated with the final model, -2log(0) is that associated with the intercept only model.. Once you have this dataset, you can readily calculate the lambda(AIC) shrinkage value given in the SUGI paper.
06-24-2015 05:40 AM
Thank you for excellent help!
Using the fitstatistics I have now calculated the lambda(AIC) shrinkage value
May I ask a following question:
I use my logistic regression to calculate the propensity score for each observation in the dataset (PROC LOGISTIC, pred=p_score). Now when I have calulated shrinkage value a want to re-caluclate the propensity score based on the shrunken regression coefficients. Is that possible? Can all this be done in one step (adding formulas in the PROC LOGISTIC)?