<?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 effects using PROC GENMOD: Comparing each subgroup in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Interaction-effects-using-PROC-GENMOD-Comparing-each-subgroup/m-p/837020#M41459</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using the PROC GENMOD statement for my analyses. I would like to see the interaction effects of two variables on the outcome.&amp;nbsp;Let's assume my&lt;/P&gt;
&lt;P&gt;- outcome HIV_STATUS = binary&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- SEX = binary&lt;/P&gt;
&lt;P&gt;- BULLYING = nominal with three levels&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC GENMOD DATA = test DESCENDING;
CLASS AREAID SEX (REF = "0") HIV_STATUS (REF = "0") BULLYING (REF = "0");
MODEL HIV_STATUS = SEX BULLYING SEX*BULLYING / DIST=Binomial LINK=Logit ALPHA=0.05 TYPE3 ;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So the resulting"&lt;SPAN&gt;Analysis Of GEE Parameter Estimates -&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Empirical Standard Error Estimates"&lt;/SPAN&gt; table output would look something like this:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Parameter&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Estimate (Log Odds)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;SEX*BULLYING&amp;nbsp; &amp;nbsp; &amp;nbsp;Level 1&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.23&lt;/P&gt;
&lt;P&gt;SEX*BULLYING&amp;nbsp; &amp;nbsp; &amp;nbsp;Level 1&amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.00&lt;/P&gt;
&lt;P&gt;SEX*BULLYING&amp;nbsp; &amp;nbsp; &amp;nbsp;Level 2&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.50&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SEX*BULLYING&amp;nbsp; &amp;nbsp; &amp;nbsp;Level 2&amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.00&lt;/P&gt;
&lt;P&gt;SEX*BULLYING&amp;nbsp; &amp;nbsp; &amp;nbsp;Level 3&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.00&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SEX*BULLYING&amp;nbsp; &amp;nbsp; &amp;nbsp;Level 3&amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.00&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I want to see the estimates comparing possible combinations. So I add the statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;LSMEANS&amp;nbsp;&amp;nbsp;SEX*BULLYING&amp;nbsp;/ DIFF ODDSRATIO CL;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The &lt;STRONG&gt;"Differences of Least Squares Means Table"&lt;/STRONG&gt; for this interaction gives me 15 different possible combinations - with an estimate statement and OR.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My question is - and bare with me as I'm new to stats - can I &lt;STRONG&gt;interpret&lt;/STRONG&gt; the &lt;U&gt;estimate&lt;/U&gt;&amp;nbsp;from the "Differences of Least Squares Means Table" as I would for the &lt;U&gt;estimate&amp;nbsp;(log odds)&amp;nbsp;&lt;/U&gt; provided by the "&lt;SPAN&gt;Analysis Of GEE Parameter Estimates -&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Empirical Standard Error Estimates"?&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Or should I be finding the ORs separately by hand using the estimates provided by the "Analysis Of GEE Parameter Estimates -&amp;nbsp;Empirical Standard Error Estimates"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you think there are any resources that might be helpful as well, please do share!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Wed, 05 Oct 2022 17:29:17 GMT</pubDate>
    <dc:creator>varatt90</dc:creator>
    <dc:date>2022-10-05T17:29:17Z</dc:date>
    <item>
      <title>Interaction effects using PROC GENMOD: Comparing each subgroup</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Interaction-effects-using-PROC-GENMOD-Comparing-each-subgroup/m-p/837020#M41459</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using the PROC GENMOD statement for my analyses. I would like to see the interaction effects of two variables on the outcome.&amp;nbsp;Let's assume my&lt;/P&gt;
&lt;P&gt;- outcome HIV_STATUS = binary&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- SEX = binary&lt;/P&gt;
&lt;P&gt;- BULLYING = nominal with three levels&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC GENMOD DATA = test DESCENDING;
CLASS AREAID SEX (REF = "0") HIV_STATUS (REF = "0") BULLYING (REF = "0");
MODEL HIV_STATUS = SEX BULLYING SEX*BULLYING / DIST=Binomial LINK=Logit ALPHA=0.05 TYPE3 ;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So the resulting"&lt;SPAN&gt;Analysis Of GEE Parameter Estimates -&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Empirical Standard Error Estimates"&lt;/SPAN&gt; table output would look something like this:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Parameter&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Estimate (Log Odds)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;SEX*BULLYING&amp;nbsp; &amp;nbsp; &amp;nbsp;Level 1&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.23&lt;/P&gt;
&lt;P&gt;SEX*BULLYING&amp;nbsp; &amp;nbsp; &amp;nbsp;Level 1&amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.00&lt;/P&gt;
&lt;P&gt;SEX*BULLYING&amp;nbsp; &amp;nbsp; &amp;nbsp;Level 2&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.50&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SEX*BULLYING&amp;nbsp; &amp;nbsp; &amp;nbsp;Level 2&amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.00&lt;/P&gt;
&lt;P&gt;SEX*BULLYING&amp;nbsp; &amp;nbsp; &amp;nbsp;Level 3&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.00&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SEX*BULLYING&amp;nbsp; &amp;nbsp; &amp;nbsp;Level 3&amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.00&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I want to see the estimates comparing possible combinations. So I add the statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;LSMEANS&amp;nbsp;&amp;nbsp;SEX*BULLYING&amp;nbsp;/ DIFF ODDSRATIO CL;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The &lt;STRONG&gt;"Differences of Least Squares Means Table"&lt;/STRONG&gt; for this interaction gives me 15 different possible combinations - with an estimate statement and OR.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My question is - and bare with me as I'm new to stats - can I &lt;STRONG&gt;interpret&lt;/STRONG&gt; the &lt;U&gt;estimate&lt;/U&gt;&amp;nbsp;from the "Differences of Least Squares Means Table" as I would for the &lt;U&gt;estimate&amp;nbsp;(log odds)&amp;nbsp;&lt;/U&gt; provided by the "&lt;SPAN&gt;Analysis Of GEE Parameter Estimates -&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Empirical Standard Error Estimates"?&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Or should I be finding the ORs separately by hand using the estimates provided by the "Analysis Of GEE Parameter Estimates -&amp;nbsp;Empirical Standard Error Estimates"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you think there are any resources that might be helpful as well, please do share!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 17:29:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Interaction-effects-using-PROC-GENMOD-Comparing-each-subgroup/m-p/837020#M41459</guid>
      <dc:creator>varatt90</dc:creator>
      <dc:date>2022-10-05T17:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: Interaction effects using PROC GENMOD: Comparing each subgroup</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Interaction-effects-using-PROC-GENMOD-Comparing-each-subgroup/m-p/837180#M41461</link>
      <description>It's not quite clear exactly what you are asking or what you want to estimate, but if you are looking tests or odds ratios comparing the 6 sex-bullying combinations, then you need only the p-values and odds ratio columns in the LSMEANS Differences table. The Estimate column in that table gives the estimated pairwise differences in log odds (equivalently, the log odds ratios). You would not interpret the Estimate column in the Parameter estimates table as odds ratios or log odds ratios. &lt;BR /&gt;&lt;BR /&gt;But I should note that PROC LOGISTIC is the better procedure to use whenever you have a logistic model. The ODDSRATIO statement in that procedure makes estimating odds ratios a bit more obvious. For your case, you could replace the LSMEANS statement with two ODDSRATIO statements:&lt;BR /&gt;&lt;BR /&gt;   oddsratio sex; oddsratio bullying;</description>
      <pubDate>Thu, 06 Oct 2022 15:00:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Interaction-effects-using-PROC-GENMOD-Comparing-each-subgroup/m-p/837180#M41461</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2022-10-06T15:00:17Z</dc:date>
    </item>
  </channel>
</rss>

