<?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 Interaction Term in Proc Surveylogistc in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Interaction-Term-in-Proc-Surveylogistc/m-p/509124#M26105</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to modeling interaction terms using proc surveylogistic. This is my original logistic regression without an interaction term. I am predicting odds of depression and my main predictors are the variables sexualminority (1= Sexual Minority 2=Not Sexual Minority and bingedrink (1=Yes binge drink currently 2=No).&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveylogistic data=survey.2017;
strata stratum;
cluster psu;
weight weight;
class gender (REF='2') sexualminority (ref='2') raceethnicity (ref='1') gradelevel (ref='1') bingedrink (ref='2')/param=ref;
model depression (ref='2')= gender sexualidentity raceethnicity gradelevel bingedrink / link=glogit rsquare;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create an interaction term sexualminority*bingedrink but I am unsure if I have the right code. Do I need to create the interaction term in a data step first?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my code so far:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveylogistic data=survey.2017;
strata stratum;
cluster psu;
weight weight;
class gender (REF='2') sexualminority (ref='2') raceethnicity (ref='1') gradelevel (ref='1') bingedrink (ref='2') sexualminority (ref='2') / param=glm;
model depression (REF='2') = sexualminority*bingedrink gender sexualminority raceethnicity gradelevel bingedrink;
lsmeans sexualminority*bingedrink /oddsratio cl diff;

slice sexualmionority*bingedrink/sliceby=bingedrink diff=control ('Sexual minority' 'Does not binge drink') oddsratio cl;

run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would this be the appropriate way to run a categorical by categorical interaction term in proc surveylogistic? Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 31 Oct 2018 15:22:05 GMT</pubDate>
    <dc:creator>jag07g</dc:creator>
    <dc:date>2018-10-31T15:22:05Z</dc:date>
    <item>
      <title>Interaction Term in Proc Surveylogistc</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Interaction-Term-in-Proc-Surveylogistc/m-p/509124#M26105</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to modeling interaction terms using proc surveylogistic. This is my original logistic regression without an interaction term. I am predicting odds of depression and my main predictors are the variables sexualminority (1= Sexual Minority 2=Not Sexual Minority and bingedrink (1=Yes binge drink currently 2=No).&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveylogistic data=survey.2017;
strata stratum;
cluster psu;
weight weight;
class gender (REF='2') sexualminority (ref='2') raceethnicity (ref='1') gradelevel (ref='1') bingedrink (ref='2')/param=ref;
model depression (ref='2')= gender sexualidentity raceethnicity gradelevel bingedrink / link=glogit rsquare;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create an interaction term sexualminority*bingedrink but I am unsure if I have the right code. Do I need to create the interaction term in a data step first?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my code so far:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveylogistic data=survey.2017;
strata stratum;
cluster psu;
weight weight;
class gender (REF='2') sexualminority (ref='2') raceethnicity (ref='1') gradelevel (ref='1') bingedrink (ref='2') sexualminority (ref='2') / param=glm;
model depression (REF='2') = sexualminority*bingedrink gender sexualminority raceethnicity gradelevel bingedrink;
lsmeans sexualminority*bingedrink /oddsratio cl diff;

slice sexualmionority*bingedrink/sliceby=bingedrink diff=control ('Sexual minority' 'Does not binge drink') oddsratio cl;

run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would this be the appropriate way to run a categorical by categorical interaction term in proc surveylogistic? Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 15:22:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Interaction-Term-in-Proc-Surveylogistc/m-p/509124#M26105</guid>
      <dc:creator>jag07g</dc:creator>
      <dc:date>2018-10-31T15:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Interaction Term in Proc Surveylogistc</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Interaction-Term-in-Proc-Surveylogistc/m-p/509158#M26106</link>
      <description>&lt;P&gt;There is a topic where a person says that, while you can do that in proc logistic, proc surveylogistic does not support this syntax:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Statistical-Procedures/Proc-Surveylogistic-Interaction-Model/td-p/358860" target="_blank"&gt;https://communities.sas.com/t5/SAS-Statistical-Procedures/Proc-Surveylogistic-Interaction-Model/td-p/358860&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Therefore,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/144066"&gt;@vcvarela&lt;/a&gt;&amp;nbsp;had to dummy-code the interaction variables into proc surveylogictic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 15:19:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Interaction-Term-in-Proc-Surveylogistc/m-p/509158#M26106</guid>
      <dc:creator>pink_poodle</dc:creator>
      <dc:date>2018-10-31T15:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: Interaction Term in Proc Surveylogistc</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Interaction-Term-in-Proc-Surveylogistc/m-p/509165#M26107</link>
      <description>&lt;P&gt;Yes the usual SAS modeling syntax of A*B on the MODEL statement also works in SURVEYLOGISTIC&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 15:22:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Interaction-Term-in-Proc-Surveylogistc/m-p/509165#M26107</guid>
      <dc:creator>SAS_Rob</dc:creator>
      <dc:date>2018-10-31T15:22:40Z</dc:date>
    </item>
  </channel>
</rss>

