<?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: Obtaining the odds ratio and 95% confidence interval from mixed effect logistic regression in sa in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-the-odds-ratio-and-95-confidence-interval-from-mixed/m-p/834866#M41356</link>
    <description>Thanks a lot. Upvoted and accepted as answer. Would it be possible to explain difference between RANDOM intercept /cl subject=HERD; vs  RANDOM HERD; only that I wrote? Appreciate your help and time</description>
    <pubDate>Fri, 23 Sep 2022 15:55:05 GMT</pubDate>
    <dc:creator>mrahouma</dc:creator>
    <dc:date>2022-09-23T15:55:05Z</dc:date>
    <item>
      <title>Obtaining the odds ratio and 95% confidence interval from mixed effect logistic regression in sas</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-the-odds-ratio-and-95-confidence-interval-from-mixed/m-p/834770#M41352</link>
      <description>&lt;P&gt;How can I get the odds ratio and 95% confidence interval from mixed effect logistic regression in sas?&lt;/P&gt;
&lt;P&gt;I am aware that odds ration could be derived by exponentiating the obtained estimate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A sample dataset and code (derived from a&lt;A href="https://communities.sas.com/t5/Statistical-Procedures/Mixed-effect-logistic-regression-model/td-p/603862" target="_self"&gt; prior post&lt;/A&gt;)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data herd;
call streaminit(1);
do herd = 1 to 10;
   do testyear = 2005, 2015;
      do Time = 1 to 6;
         eta = -1 + 0.1*herd + 0.5*Time - 2*(testyear=2015);
         mu = logistic(eta);
         mpd = rand("Bernoulli", mu);
         output;
      end;
   end;
end;

proc GLIMMIX data = herd;
   class testyear TIME;
   model MPD = TESTYEAR TIME / s dist=binary;
   RANDOM HERD;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Appreciate any advice.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 23:29:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-the-odds-ratio-and-95-confidence-interval-from-mixed/m-p/834770#M41352</guid>
      <dc:creator>mrahouma</dc:creator>
      <dc:date>2022-09-22T23:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining the odds ratio and 95% confidence interval from mixed effect logistic regression in sa</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-the-odds-ratio-and-95-confidence-interval-from-mixed/m-p/834823#M41353</link>
      <description>&lt;PRE&gt;/*
You could get CI of estimated parameter,
and EXP() this CI to get CI of ODDS Rario. 
*/

data herd;
call streaminit(1);
do herd = 1 to 10;
   do testyear = 2005, 2015;
      do Time = 1 to 6;
         eta = -1 + 0.1*herd + 0.5*Time - 2*(testyear=2015);
         mu = logistic(eta);
         mpd = rand("Bernoulli", mu);
         output;
      end;
   end;
end;
run;

ods output ParameterEstimates=ParameterEstimates SolutionR=SolutionR;
proc GLIMMIX data = herd;
   class HERD testyear TIME;
   model MPD = TESTYEAR TIME / s dist=binary cl ODDSRATIO;
   RANDOM intercept /cl subject=HERD;
RUN;


data fixed;
 set ParameterEstimates;
 odds_ratio=exp(Estimate);
 lower_odds_ratio=exp(Lower);
 upper_odds_ratio=exp(Upper);
run;
proc print label;run;


data mixed;
 set SolutionR;
 odds_ratio=exp(Estimate);
 lower_odds_ratio=exp(Lower);
 upper_odds_ratio=exp(Upper);
run;
proc print label;run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 23 Sep 2022 11:52:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-the-odds-ratio-and-95-confidence-interval-from-mixed/m-p/834823#M41353</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-09-23T11:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining the odds ratio and 95% confidence interval from mixed effect logistic regression in sa</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-the-odds-ratio-and-95-confidence-interval-from-mixed/m-p/834866#M41356</link>
      <description>Thanks a lot. Upvoted and accepted as answer. Would it be possible to explain difference between RANDOM intercept /cl subject=HERD; vs  RANDOM HERD; only that I wrote? Appreciate your help and time</description>
      <pubDate>Fri, 23 Sep 2022 15:55:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-the-odds-ratio-and-95-confidence-interval-from-mixed/m-p/834866#M41356</guid>
      <dc:creator>mrahouma</dc:creator>
      <dc:date>2022-09-23T15:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining the odds ratio and 95% confidence interval from mixed effect logistic regression in sa</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-the-odds-ratio-and-95-confidence-interval-from-mixed/m-p/834999#M41365</link>
      <description>If you need MIXED effect ,you need a variable named SUBJECT . I look at your dataset and think HERD is the SUBJECT. So I wrote:&lt;BR /&gt; RANDOM intercept /cl subject=HERD;&lt;BR /&gt;and &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15363"&gt;@SteveDenham&lt;/a&gt; &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13758"&gt;@lvm&lt;/a&gt; &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt; could give you the exact right syntax as long as you pointed out what you are looking for .&lt;BR /&gt;</description>
      <pubDate>Sat, 24 Sep 2022 09:24:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-the-odds-ratio-and-95-confidence-interval-from-mixed/m-p/834999#M41365</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-09-24T09:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining the odds ratio and 95% confidence interval from mixed effect logistic regression in sa</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-the-odds-ratio-and-95-confidence-interval-from-mixed/m-p/835162#M41371</link>
      <description>&lt;P&gt;The two syntax's should give you the same results.&amp;nbsp; However, for complex designs, the use of the intercept/subject= syntax improves convergence.&amp;nbsp; See this paper:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings15/SAS1919-2015.pdf" target="_self"&gt;https://support.sas.com/resources/papers/proceedings15/SAS1919-2015.pdf&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 13:26:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-the-odds-ratio-and-95-confidence-interval-from-mixed/m-p/835162#M41371</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2022-09-26T13:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining the odds ratio and 95% confidence interval from mixed effect logistic regression in sa</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-the-odds-ratio-and-95-confidence-interval-from-mixed/m-p/835212#M41373</link>
      <description>Thx a lot. Greatly appreciated.</description>
      <pubDate>Mon, 26 Sep 2022 16:06:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-the-odds-ratio-and-95-confidence-interval-from-mixed/m-p/835212#M41373</guid>
      <dc:creator>mrahouma</dc:creator>
      <dc:date>2022-09-26T16:06:16Z</dc:date>
    </item>
  </channel>
</rss>

