<?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: Combining categories vs interactions in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Combining-categories-vs-interactions/m-p/781585#M38394</link>
    <description>&lt;P&gt;Include the interaction, but you'll need to use the LSMEANS statement to get the odds ratios comparing combinations of the predictor levels. For example, these statements give all of the odds ratios comparing the combinations of the predictor levels.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic;
class a b/param=glm;
model y(event="1")=a|b;
lsmeans a*b/ ilink diff oddsratio cl;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 21 Nov 2021 22:11:39 GMT</pubDate>
    <dc:creator>StatDave</dc:creator>
    <dc:date>2021-11-21T22:11:39Z</dc:date>
    <item>
      <title>Combining categories vs interactions</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Combining-categories-vs-interactions/m-p/781555#M38387</link>
      <description>Hello, &lt;BR /&gt;I am using a logistic regression model for my categorical data. I have a dichotomous outcome variable and gender and depression as the independent variables. I am interested in looking at the outcome for a combined category of depressed female. Should I create a new categorical variable where female=1 and depression = 1 or will the interaction term give me the odds ratio for a depressed female?</description>
      <pubDate>Sun, 21 Nov 2021 16:31:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Combining-categories-vs-interactions/m-p/781555#M38387</guid>
      <dc:creator>analyst_work</dc:creator>
      <dc:date>2021-11-21T16:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: Combining categories vs interactions</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Combining-categories-vs-interactions/m-p/781557#M38389</link>
      <description>&lt;P&gt;Fit the interaction term. Then use the &lt;A href="https://documentation.sas.com/doc/en/pgmmvacdc/9.4/statug/statug_logistic_syntax26.htm" target="_self"&gt;ODDSRATIO command&lt;/A&gt; in PROC LOGISTIC to look at the effect at specific values of your x-variables.&lt;/P&gt;</description>
      <pubDate>Sun, 21 Nov 2021 16:54:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Combining-categories-vs-interactions/m-p/781557#M38389</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-11-21T16:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Combining categories vs interactions</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Combining-categories-vs-interactions/m-p/781585#M38394</link>
      <description>&lt;P&gt;Include the interaction, but you'll need to use the LSMEANS statement to get the odds ratios comparing combinations of the predictor levels. For example, these statements give all of the odds ratios comparing the combinations of the predictor levels.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic;
class a b/param=glm;
model y(event="1")=a|b;
lsmeans a*b/ ilink diff oddsratio cl;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 21 Nov 2021 22:11:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Combining-categories-vs-interactions/m-p/781585#M38394</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2021-11-21T22:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: Combining categories vs interactions</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Combining-categories-vs-interactions/m-p/782493#M38434</link>
      <description>Thank you so much! It looks like there is quasi complete separation due to one of the categories, so I might need to combine a few categories. &lt;BR /&gt;One follow-up question:&lt;BR /&gt;If I need to also look at females with migraine in addition to females w depression, would that then be a three way interaction term?</description>
      <pubDate>Fri, 26 Nov 2021 01:59:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Combining-categories-vs-interactions/m-p/782493#M38434</guid>
      <dc:creator>analyst_work</dc:creator>
      <dc:date>2021-11-26T01:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: Combining categories vs interactions</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Combining-categories-vs-interactions/m-p/782678#M38438</link>
      <description>&lt;P&gt;Assuming that migraine is another categorical predictor, then yes, you can try to add it in the model interacting with the other variables: &amp;nbsp;model y(event="1")=a|b|c; Note that the a|b|c syntax is shorthand for all three main effects, all three two-way interactions, and the three-way interaction.&amp;nbsp;But if you already have separation problems, then adding another categorical predictor will make it worse. Separation is caused when one or more combinations of levels of the predictors does not have any of one level of the response making the data sparse. This causes some of the model parameters to be infinite, making proper convergence of the iterative fitting algorithm impossible. Adding another predictor creates more combinations for the same amount response information to be spread over - increasing the sparseness. In some cases, you can use the FIRTH option in the MODEL statement to produce results in spite of the separation problem. The Firth method is a modification of the fitting algorithm to use a penalized likelihood function.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Nov 2021 16:21:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Combining-categories-vs-interactions/m-p/782678#M38438</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2021-11-27T16:21:19Z</dc:date>
    </item>
  </channel>
</rss>

