Statistical Procedures

Programming the statistical procedures from SAS
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MikeTurner
Calcite | Level 5

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!

1 ACCEPTED SOLUTION

Accepted Solutions
Keith
Obsidian | Level 7

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.

http://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#statug_logistic_sec...

View solution in original post

6 REPLIES 6
Keith
Obsidian | Level 7

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.

http://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#statug_logistic_sec...

MikeTurner
Calcite | Level 5

Great! I'll give one try. Thanks, Keith!

SteveDenham
Jade | Level 19

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

PGStats
Opal | Level 21

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

PG
MikeTurner
Calcite | Level 5

One more question.

How to output the odds value for every observation to one dataset?

Thanks!

Keith
Obsidian | Level 7

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;

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 6 replies
  • 18510 views
  • 0 likes
  • 4 in conversation