<?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: maximum number of effects in Stepwise selection in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/maximum-number-of-effects-in-Stepwise-selection/m-p/616732#M18951</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733"&gt;@FreelanceReinh&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/306497"&gt;@dawidkaz&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think the stepwise effect selection method is not compatible with pre-specifying the number of explanatory variables in the model. So, you may want to try SELECTION=FORWARD and SELECTION=BACKWARD, each in conjunction with STOP=8. If there really is an outstanding subset of exactly 8 predictors (not sure how you know this number beforehand), chances are that the two selection processes end up with the same model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alternatively, you could narrow down the set of potential model variables to, say, 10-12 predictors (e.g., using stepwise selection) and then write a macro to construct &lt;EM&gt;all&lt;/EM&gt; possible models (without interactions) involving exactly 8 predictors from this superset (e.g., &lt;FONT face="courier new,courier"&gt;comb(12,8)=495&lt;/FONT&gt;). The macro could create a dataset containing relevant statistics of your choice taken from (ODS) output datasets for each model. A review and analysis of this dataset together with subject matter considerations (plausibility, etc.) could finally support the decision for a "best" 8-variable model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit:&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;: The &lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_phreg_syntax17.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en#statug.phreg.phrmodstop" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt; says: "&lt;SPAN&gt;The STOP= option has no effect when SELECTION=NONE or STEPWISE." And perhaps I should have mentioned the general concerns against automatic variable selection that you have (rightly) expressed in various posts.&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;All excellent points. I hate stepwise, I think it is something I would never use and never recommend (and so I really didn't know any more, although I Might have known at one time) that STOP= doesn't work in this situation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I advise all posters not to say "it doesn't work" or "there was an error" &lt;EM&gt;and then provide no additional information about what doesn't work or what the error was&lt;/EM&gt;. Additional information is always needed, those very brief descriptions of the problem "it doesn't work" or "there was an error" are never sufficient, and follow up questions are always needed unless someone like you &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733"&gt;@FreelanceReinh&lt;/a&gt; is willing to do some digging.&lt;/P&gt;</description>
    <pubDate>Sat, 11 Jan 2020 23:33:22 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-01-11T23:33:22Z</dc:date>
    <item>
      <title>maximum number of effects in Stepwise selection</title>
      <link>https://communities.sas.com/t5/New-SAS-User/maximum-number-of-effects-in-Stepwise-selection/m-p/616689#M18948</link>
      <description>&lt;P&gt;I need to build the model with 8 explanatory variables using stepwise selection:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics on;
proc phreg data=w1 alpha=0.05 namelen=32;
class &amp;amp;zm_class. app_number_of_children_f;
model ttd * rc(0,1) = act_age-numeric-act_CAll_All &amp;amp;zm_class. app_number_of_children_f / ties = breslow rl=wald selection=stepwise slentry=0.001
                           slstay=0.0001   ;
ods graphics off;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;stop=8 is not working, Is there other way to that rather tha minimising slentry and slstay or picking the variables selected at the 8th step ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jan 2020 15:53:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/maximum-number-of-effects-in-Stepwise-selection/m-p/616689#M18948</guid>
      <dc:creator>dawidkaz</dc:creator>
      <dc:date>2020-01-11T15:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: maximum number of effects in Stepwise selection</title>
      <link>https://communities.sas.com/t5/New-SAS-User/maximum-number-of-effects-in-Stepwise-selection/m-p/616701#M18949</link>
      <description>&lt;P&gt;What does "step 8 is not working" mean? What didn't work? Why do you think it didn't work? Is there an error? If so, what error?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, what is the value of macro variable &amp;amp;ZM_CLASS?&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jan 2020 17:30:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/maximum-number-of-effects-in-Stepwise-selection/m-p/616701#M18949</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-01-11T17:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: maximum number of effects in Stepwise selection</title>
      <link>https://communities.sas.com/t5/New-SAS-User/maximum-number-of-effects-in-Stepwise-selection/m-p/616707#M18950</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/306497"&gt;@dawidkaz&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think the stepwise effect selection method is not compatible with pre-specifying the number of explanatory variables in the model. So, you may want to try SELECTION=FORWARD and SELECTION=BACKWARD, each in conjunction with STOP=8. If there really is an outstanding subset of exactly 8 predictors (not sure how you know this number beforehand), chances are that the two selection processes end up with the same model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alternatively, you could narrow down the set of potential model variables to, say, 10-12 predictors (e.g., using stepwise selection) and then write a macro to construct &lt;EM&gt;all&lt;/EM&gt; possible models (without interactions) involving exactly 8 predictors from this superset (e.g., &lt;FONT face="courier new,courier"&gt;comb(12,8)=495&lt;/FONT&gt;). The macro could create a dataset containing relevant statistics of your choice taken from (ODS) output datasets for each model. A review and analysis of this dataset together with subject matter considerations (plausibility, etc.) could finally support the decision for a "best" 8-variable model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit:&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;: The &lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_phreg_syntax17.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en#statug.phreg.phrmodstop" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt; says: "&lt;SPAN&gt;The STOP= option has no effect when SELECTION=NONE or STEPWISE." And perhaps I should have mentioned the general concerns against automatic variable selection that you have (rightly) expressed in various posts.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jan 2020 18:07:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/maximum-number-of-effects-in-Stepwise-selection/m-p/616707#M18950</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2020-01-11T18:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: maximum number of effects in Stepwise selection</title>
      <link>https://communities.sas.com/t5/New-SAS-User/maximum-number-of-effects-in-Stepwise-selection/m-p/616732#M18951</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733"&gt;@FreelanceReinh&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/306497"&gt;@dawidkaz&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think the stepwise effect selection method is not compatible with pre-specifying the number of explanatory variables in the model. So, you may want to try SELECTION=FORWARD and SELECTION=BACKWARD, each in conjunction with STOP=8. If there really is an outstanding subset of exactly 8 predictors (not sure how you know this number beforehand), chances are that the two selection processes end up with the same model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alternatively, you could narrow down the set of potential model variables to, say, 10-12 predictors (e.g., using stepwise selection) and then write a macro to construct &lt;EM&gt;all&lt;/EM&gt; possible models (without interactions) involving exactly 8 predictors from this superset (e.g., &lt;FONT face="courier new,courier"&gt;comb(12,8)=495&lt;/FONT&gt;). The macro could create a dataset containing relevant statistics of your choice taken from (ODS) output datasets for each model. A review and analysis of this dataset together with subject matter considerations (plausibility, etc.) could finally support the decision for a "best" 8-variable model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit:&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;: The &lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_phreg_syntax17.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en#statug.phreg.phrmodstop" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt; says: "&lt;SPAN&gt;The STOP= option has no effect when SELECTION=NONE or STEPWISE." And perhaps I should have mentioned the general concerns against automatic variable selection that you have (rightly) expressed in various posts.&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;All excellent points. I hate stepwise, I think it is something I would never use and never recommend (and so I really didn't know any more, although I Might have known at one time) that STOP= doesn't work in this situation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I advise all posters not to say "it doesn't work" or "there was an error" &lt;EM&gt;and then provide no additional information about what doesn't work or what the error was&lt;/EM&gt;. Additional information is always needed, those very brief descriptions of the problem "it doesn't work" or "there was an error" are never sufficient, and follow up questions are always needed unless someone like you &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733"&gt;@FreelanceReinh&lt;/a&gt; is willing to do some digging.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jan 2020 23:33:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/maximum-number-of-effects-in-Stepwise-selection/m-p/616732#M18951</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-01-11T23:33:22Z</dc:date>
    </item>
  </channel>
</rss>

