<?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: How to forward stepwise model selection? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Interaction-terms-in-a-Logistic-regression-model/m-p/470904#M24496</link>
    <description>&lt;P&gt;Since this is an assignment there are probably some other things that effect the answer. You have 7 variables and 2 way interactions alone are a lot.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can specify interaction terms in the model statement as:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;model mort_10yr(ref='0') = age | sex | race | educ @2 / &amp;lt;list of options&amp;gt;;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/141062"&gt;@the&lt;/a&gt; | pipe symbol tells SAS to consider interactions between the variables and then the&amp;nbsp;@2 tells SAS to limit it to interaction level between 2 variables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;@3 would test 3-way interactions such as age*sex*race.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can explicitly list interactions such as:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;age*sex educ*race&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is covered in the documentation here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=casecon&amp;amp;docsetTarget=viyaets_introcom_sect021.htm&amp;amp;docsetVersion=8.1&amp;amp;locale=zh-CN" target="_blank"&gt;http://documentation.sas.com/?docsetId=casecon&amp;amp;docsetTarget=viyaets_introcom_sect021.htm&amp;amp;docsetVersion=8.1&amp;amp;locale=zh-CN&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can include all variables in the initial model, if you have enough observations to allow for that. You're possibly testing 7 +&amp;nbsp;21 two way combinations and&amp;nbsp;categorical variables will increase the numbers. A good rule of thumb is 25 obs per predictor so you would need at minimum 28*25 = 700 obs to start off with.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm going to move this to the Stats forum so the stats people can comment.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/192118"&gt;@iressa131&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am attempting&amp;nbsp; to build a model with 7 predictors and a binary outcome. I can only use stepwise selection for my assignment.&amp;nbsp;Here is what I currently have in SAS university. Now i know i need to account for possible interactions but how would I do this? Do I include all possible interaction terms in THIS model or do I code for additional models, each one containing a different set of variables/interactions of interest? Thanks in advance for any help!&lt;/P&gt;
&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=fp;
class race(ref='White') Sex(ref='F')/param=reference;
model mort_10yr(ref='0') = age sex race educ income_pov_indx log_cotinine log_tungsten FP FI
/selection=stepwise slentry=0.2 slstay=0.15 details lackfit;
run; &lt;BR /&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 17 Jun 2018 19:05:57 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-06-17T19:05:57Z</dc:date>
    <item>
      <title>Interaction terms in a Logistic regression model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Interaction-terms-in-a-Logistic-regression-model/m-p/470900#M24495</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am attempting&amp;nbsp; to build a model with 7 predictors and a binary outcome. I can only use stepwise selection for my assignment.&amp;nbsp;Here is what I currently have in SAS university. Now i know i need to account for possible interactions but how would I do this? Do I include all possible interaction terms in THIS model or do I code for additional models, each one containing a different set of variables/interactions of interest? Thanks in advance for any help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=fp;
class race(ref='White') Sex(ref='F')/param=reference;
model mort_10yr(ref='0') = age sex race educ income_pov_indx log_cotinine log_tungsten FP FI
/selection=stepwise slentry=0.2 slstay=0.15 details lackfit;
run; &lt;BR /&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jun 2018 19:06:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Interaction-terms-in-a-Logistic-regression-model/m-p/470900#M24495</guid>
      <dc:creator>iressa131</dc:creator>
      <dc:date>2018-06-17T19:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to forward stepwise model selection?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Interaction-terms-in-a-Logistic-regression-model/m-p/470904#M24496</link>
      <description>&lt;P&gt;Since this is an assignment there are probably some other things that effect the answer. You have 7 variables and 2 way interactions alone are a lot.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can specify interaction terms in the model statement as:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;model mort_10yr(ref='0') = age | sex | race | educ @2 / &amp;lt;list of options&amp;gt;;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/141062"&gt;@the&lt;/a&gt; | pipe symbol tells SAS to consider interactions between the variables and then the&amp;nbsp;@2 tells SAS to limit it to interaction level between 2 variables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;@3 would test 3-way interactions such as age*sex*race.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can explicitly list interactions such as:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;age*sex educ*race&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is covered in the documentation here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=casecon&amp;amp;docsetTarget=viyaets_introcom_sect021.htm&amp;amp;docsetVersion=8.1&amp;amp;locale=zh-CN" target="_blank"&gt;http://documentation.sas.com/?docsetId=casecon&amp;amp;docsetTarget=viyaets_introcom_sect021.htm&amp;amp;docsetVersion=8.1&amp;amp;locale=zh-CN&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can include all variables in the initial model, if you have enough observations to allow for that. You're possibly testing 7 +&amp;nbsp;21 two way combinations and&amp;nbsp;categorical variables will increase the numbers. A good rule of thumb is 25 obs per predictor so you would need at minimum 28*25 = 700 obs to start off with.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm going to move this to the Stats forum so the stats people can comment.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/192118"&gt;@iressa131&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am attempting&amp;nbsp; to build a model with 7 predictors and a binary outcome. I can only use stepwise selection for my assignment.&amp;nbsp;Here is what I currently have in SAS university. Now i know i need to account for possible interactions but how would I do this? Do I include all possible interaction terms in THIS model or do I code for additional models, each one containing a different set of variables/interactions of interest? Thanks in advance for any help!&lt;/P&gt;
&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=fp;
class race(ref='White') Sex(ref='F')/param=reference;
model mort_10yr(ref='0') = age sex race educ income_pov_indx log_cotinine log_tungsten FP FI
/selection=stepwise slentry=0.2 slstay=0.15 details lackfit;
run; &lt;BR /&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jun 2018 19:05:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Interaction-terms-in-a-Logistic-regression-model/m-p/470904#M24496</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-17T19:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to forward stepwise model selection?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Interaction-terms-in-a-Logistic-regression-model/m-p/470912#M24497</link>
      <description>&lt;P&gt;Thank you so much for the informative reply! I only have 520 observations so it appears I won't be able to&amp;nbsp;use the method you suggested. I didn't realize there was a board for statistical questions thank you!&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jun 2018 19:25:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Interaction-terms-in-a-Logistic-regression-model/m-p/470912#M24497</guid>
      <dc:creator>iressa131</dc:creator>
      <dc:date>2018-06-17T19:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to forward stepwise model selection?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Interaction-terms-in-a-Logistic-regression-model/m-p/470917#M24498</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/192118"&gt;@iressa131&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you so much for the informative reply! I only have 520 observations so it appears I won't be able to&amp;nbsp;use the method you suggested. I didn't realize there was a board for statistical questions thank you!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It's not a can't, it's a shouldn't. Hopefully someone has better advice for you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jun 2018 19:31:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Interaction-terms-in-a-Logistic-regression-model/m-p/470917#M24498</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-17T19:31:45Z</dc:date>
    </item>
  </channel>
</rss>

