Hello,everyone! I need to do logistic regression on my data,but the client offered me more than 20 variables. I'm pretty sure that some of them are not necessary. But how to remove them? Is there one stepwise method, just like proc reg, for proc logistic?
Anyone could help me out?
Thanks!
Yes, there is a SELECTION= option in the MODEL statement within PROC LOGISTIC. The methods available are BACKWARD, FORWARD, STEPWISE and SCORE. Check out the SAS documentation below.
Yes, there is a SELECTION= option in the MODEL statement within PROC LOGISTIC. The methods available are BACKWARD, FORWARD, STEPWISE and SCORE. Check out the SAS documentation below.
Great! I'll give one try. Thanks, Keith!
Mike,
Before you get too far with stepwise selection, you might want to read the paper by Peter Flom and David Cassell on "Stopping Stepwise." It is at
http://www.nesug.org/proceedings/nesug07/sa/sa07.pdf
If the link isn't clickable, paste it into your browser. There have been several presentations regarding the use of the LASSO method in PROC GLMSELECT to get a reasonable model, even for non-normally distributed response variables.
Good luck.
Steve Denham
Hi Steve, thanks for the reference. I wish the equivalent of GLMSELECT was available for logistic regression. It would save me a lot of work! - PG
One more question.
How to output the odds value for every observation to one dataset?
Thanks!
I'm not sure if you can output the odds, however you can output the estimated probability (from which you could easily calculate the odds)
proc logistic data=sashelp.class;
output out=test predicted=prob;
model sex= age height weight;
run;
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.