<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: what's the backward selection default stopping rule in proc logistic? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/what-s-the-backward-selection-default-stopping-rule-in-proc/m-p/828226#M327161</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/431390"&gt;@Xixi97&lt;/a&gt;&amp;nbsp;and welcome to the SAS Support Communities!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to the &lt;A href="https://documentation.sas.com/doc/en/statug/15.2/statug_logistic_syntax22.htm#statug.logistic.logisticslstay" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt; the default criterion is SLSTAY=0.05.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's check this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* 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;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;                                                                       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    &lt;FONT color="#008080"&gt;&lt;STRONG&gt;&lt;FONT size="4"&gt;0.0499&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;       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    &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;&lt;FONT size="4"&gt;0.0505&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;       MLE&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* 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;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;                                                                       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    &lt;FONT color="#008080"&gt;&lt;STRONG&gt;&lt;FONT size="4"&gt;0.0499&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;       MLE
 3     2    Intercept     1      0.0197     0.00995        3.9014    0.0482       MLE&lt;/PRE&gt;
&lt;P&gt;As expected, only in group &lt;FONT face="courier new,courier"&gt;g=1&lt;/FONT&gt;&amp;nbsp;variable &lt;FONT face="courier new,courier"&gt;v&lt;/FONT&gt;&amp;nbsp;met the selection criterion "&lt;FONT face="courier new,courier"&gt;ProbChiSq&amp;lt;=SLSTAY=0.05&lt;/FONT&gt;" and thus made it into the final model.&lt;/P&gt;</description>
    <pubDate>Thu, 11 Aug 2022 09:13:39 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2022-08-11T09:13:39Z</dc:date>
    <item>
      <title>what's the backward selection default stopping rule in proc logistic?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-s-the-backward-selection-default-stopping-rule-in-proc/m-p/828203#M327151</link>
      <description>&lt;P&gt;If I don't specify the&lt;SPAN&gt;&amp;nbsp;SLENTRY and SLSTAY options in code below,&amp;nbsp;what's the backward selection default stopping rule in SAS?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;proc logistic data = dataset;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;model&amp;nbsp;&lt;/SPAN&gt;Y(event='1')=X /selection = backward;&lt;/P&gt;&lt;P&gt;run;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 01:56:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-s-the-backward-selection-default-stopping-rule-in-proc/m-p/828203#M327151</guid>
      <dc:creator>Xixi97</dc:creator>
      <dc:date>2022-08-11T01:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: what's the backward selection default stopping rule in proc logistic?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-s-the-backward-selection-default-stopping-rule-in-proc/m-p/828226#M327161</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/431390"&gt;@Xixi97&lt;/a&gt;&amp;nbsp;and welcome to the SAS Support Communities!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to the &lt;A href="https://documentation.sas.com/doc/en/statug/15.2/statug_logistic_syntax22.htm#statug.logistic.logisticslstay" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt; the default criterion is SLSTAY=0.05.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's check this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* 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;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;                                                                       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    &lt;FONT color="#008080"&gt;&lt;STRONG&gt;&lt;FONT size="4"&gt;0.0499&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;       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    &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;&lt;FONT size="4"&gt;0.0505&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;       MLE&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* 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;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;                                                                       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    &lt;FONT color="#008080"&gt;&lt;STRONG&gt;&lt;FONT size="4"&gt;0.0499&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;       MLE
 3     2    Intercept     1      0.0197     0.00995        3.9014    0.0482       MLE&lt;/PRE&gt;
&lt;P&gt;As expected, only in group &lt;FONT face="courier new,courier"&gt;g=1&lt;/FONT&gt;&amp;nbsp;variable &lt;FONT face="courier new,courier"&gt;v&lt;/FONT&gt;&amp;nbsp;met the selection criterion "&lt;FONT face="courier new,courier"&gt;ProbChiSq&amp;lt;=SLSTAY=0.05&lt;/FONT&gt;" and thus made it into the final model.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 09:13:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-s-the-backward-selection-default-stopping-rule-in-proc/m-p/828226#M327161</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2022-08-11T09:13:39Z</dc:date>
    </item>
  </channel>
</rss>

