BookmarkSubscribeRSS Feed
Xixi97
Calcite | Level 5

If I don't specify the SLENTRY and SLSTAY options in code below, what's the backward selection default stopping rule in SAS?

 

proc logistic data = dataset;

model Y(event='1')=X /selection = backward;

run; 

 

1 REPLY 1
FreelanceReinh
Jade | Level 19

Hello @Xixi97 and welcome to the SAS Support Communities!

 

According to the documentation the default criterion is SLSTAY=0.05.

 

Let's check this:

/* Create sample data for demonstration */

data test;
input g r v n;
cards;
1 0 0 10000
1 0 1 10000
1 1 0 10000
1 1 1 10398
2 0 0 10000
2 0 1 10000
2 1 0 10000
2 1 1 10397
;

/* Fit the full model by group (g) for response r=1 with predictor v */

ods output parameterestimates=est;
proc logistic data=test desc;
by g;
freq n;
model r=v;
run;

proc print data=est;
run;

Result:

                                                                       Prob
Obs    g    Variable     DF    Estimate      StdErr     WaldChiSq     ChiSq    _ESTTYPE_

 1     1    Intercept     1    -1.28E-6      0.0141        0.0000    0.9999       MLE
 2     1    v             1      0.0390      0.0199        3.8446    0.0499       MLE
 3     2    Intercept     1    -1.27E-6      0.0141        0.0000    0.9999       MLE
 4     2    v             1      0.0389      0.0199        3.8256    0.0505       MLE
/* Use backward elimination with the default SLSTAY=0.05 */

ods output parameterestimates=estb;
proc logistic data=test desc;
by g;
freq n;
model r=v / selection=backward;
run;

proc print data=estb;
run;

Result:

                                                                       Prob
Obs    g    Variable     DF    Estimate      StdErr     WaldChiSq     ChiSq    _ESTTYPE_

 1     1    Intercept     1    -1.28E-6      0.0141        0.0000    0.9999       MLE
 2     1    v             1      0.0390      0.0199        3.8446    0.0499       MLE
 3     2    Intercept     1      0.0197     0.00995        3.9014    0.0482       MLE

As expected, only in group g=1 variable v met the selection criterion "ProbChiSq<=SLSTAY=0.05" and thus made it into the final model.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 360 views
  • 1 like
  • 2 in conversation