<?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: Logistic regression with PROC GLIMMIX - specification of random statement w/ multiple random eff in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-with-PROC-GLIMMIX-specification-of-random/m-p/644357#M30901</link>
    <description>&lt;P&gt;Nothing wrong with the first batch of code.&amp;nbsp; The main reason you see a lot of RANDOM intercept/subject=X examples is that by subject processing is much faster.&amp;nbsp; You might consider having two RANDOM statements, each modeling a random intercept, such as:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;RANDOM intercept/subject=anesth;&lt;/P&gt;
&lt;P&gt;RANDOM intercept/subject=surgeon;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Be sure the data set is sorted by anesth and surgeon before trying this, however.&amp;nbsp; I have some other ideas in case this doesn't work out, but again, your first batch of code ought to give what you want, at the price of computation time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding the Wald option in COVTEST, check out this Wikipedia link (down at the part on Alternatives to the Wald Test);&lt;A href="https://en.wikipedia.org/wiki/Wald_test" target="_self"&gt;https://en.wikipedia.org/wiki/Wald_test&lt;/A&gt;&amp;nbsp;.&amp;nbsp; I would go with the&amp;nbsp;&lt;EM&gt;classical&lt;/EM&gt; option, which does a likelihood ratio test.&amp;nbsp; At least that doesn't assume that you have a good estimate of the variability of the variance components.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
    <pubDate>Thu, 30 Apr 2020 18:56:15 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2020-04-30T18:56:15Z</dc:date>
    <item>
      <title>Logistic regression with PROC GLIMMIX - specification of random statement w/ multiple random effects</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-with-PROC-GLIMMIX-specification-of-random/m-p/644257#M30897</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm running a logistic regression model, hoping to evaluate the impact of a patient's surgical team on their likelihood of receiving a specific medication. I would like to incorporate the patient's anesthesiologist &amp;amp; surgeon as separate random effects. I've structured the model as below, but I just wanted to confirm that this is a reasonable approach, as most of the glimmix documents I've read specify the random statement with "random int / subject = X". In my case, I haven't structured it that way because I have two random effects and I would rather not study the composite variability of (anesthesiologist*surgeon) if possible (I'd like to evaluate the variability in their likelihood of using a medication separately if possible). Is this a reasonable way to structure the code given those objectives?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc glimmix data=TXAHipA method=Laplace;&lt;BR /&gt;class anesth surgeon sex urgency year;&lt;BR /&gt;effect age_spline = spline(age / details naturalcubic basis=tpf(noint) &lt;BR /&gt;knotmethod=percentiles(5));&lt;BR /&gt;effect Hb_spline = spline(Hb / details naturalcubic basis=tpf(noint) &lt;BR /&gt;knotmethod=percentiles(5));&lt;BR /&gt;model TXAstatus = age_spline Hb_spline sex urgency year / solution dist=binomial link=logit;&lt;BR /&gt;random anesth surgeon;&lt;BR /&gt;COVTEST / wald;&lt;BR /&gt;output out=glimmixout pred( blup ilink) = PredProb&lt;BR /&gt;pred(noblup ilink) = PredProb_PA;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another way I've considered is as follows, but it creates issues with identifying the separate impacts of the two individuals:&lt;/P&gt;
&lt;P&gt;proc glimmix data=TXAHipA method=Laplace;&lt;BR /&gt;class anesth surgeon sex urgency year;&lt;BR /&gt;effect age_spline = spline(age / details naturalcubic basis=tpf(noint) &lt;BR /&gt;knotmethod=percentiles(5));&lt;BR /&gt;effect Hb_spline = spline(Hb / details naturalcubic basis=tpf(noint) &lt;BR /&gt;knotmethod=percentiles(5));&lt;BR /&gt;model TXAstatus = age_spline Hb_spline sex urgency year / solution dist=binomial link=logit;&lt;BR /&gt;random intercept / subject=anesth*surgeon;&lt;BR /&gt;COVTEST / wald;&lt;BR /&gt;output out=glimmixout pred( blup ilink) = PredProb&lt;BR /&gt;pred(noblup ilink) = PredProb_PA;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any advice would be much appreciated. I've had a difficult time figuring out the differences between these two syntaxes and want to make my code reflects my intentions.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Brett&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 14:45:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-with-PROC-GLIMMIX-specification-of-random/m-p/644257#M30897</guid>
      <dc:creator>bretthouston</dc:creator>
      <dc:date>2020-04-30T14:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic regression with PROC GLIMMIX - specification of random statement w/ multiple random eff</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-with-PROC-GLIMMIX-specification-of-random/m-p/644357#M30901</link>
      <description>&lt;P&gt;Nothing wrong with the first batch of code.&amp;nbsp; The main reason you see a lot of RANDOM intercept/subject=X examples is that by subject processing is much faster.&amp;nbsp; You might consider having two RANDOM statements, each modeling a random intercept, such as:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;RANDOM intercept/subject=anesth;&lt;/P&gt;
&lt;P&gt;RANDOM intercept/subject=surgeon;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Be sure the data set is sorted by anesth and surgeon before trying this, however.&amp;nbsp; I have some other ideas in case this doesn't work out, but again, your first batch of code ought to give what you want, at the price of computation time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding the Wald option in COVTEST, check out this Wikipedia link (down at the part on Alternatives to the Wald Test);&lt;A href="https://en.wikipedia.org/wiki/Wald_test" target="_self"&gt;https://en.wikipedia.org/wiki/Wald_test&lt;/A&gt;&amp;nbsp;.&amp;nbsp; I would go with the&amp;nbsp;&lt;EM&gt;classical&lt;/EM&gt; option, which does a likelihood ratio test.&amp;nbsp; At least that doesn't assume that you have a good estimate of the variability of the variance components.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 18:56:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-with-PROC-GLIMMIX-specification-of-random/m-p/644357#M30901</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-04-30T18:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic regression with PROC GLIMMIX - specification of random statement w/ multiple random eff</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-with-PROC-GLIMMIX-specification-of-random/m-p/644368#M30902</link>
      <description>&lt;P&gt;Hi Steve,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank-you for this feedback - this is incredibly helpful. I've run the code the second way you suggested (with two random statements), and the results are essentially identical.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I appreciate your thoughts about the likelihood ratio test. I had explicitly used the covtest / wald statement because otherwise SAS doesn't provide p-values (maybe appropriately so!) for the covariance parameters in this setting. Is there an alternative way you request the likelihood ratio test in proc glimmix (ie, the classical option)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks again,&lt;/P&gt;
&lt;P&gt;Brett&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 19:18:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-with-PROC-GLIMMIX-specification-of-random/m-p/644368#M30902</guid>
      <dc:creator>bretthouston</dc:creator>
      <dc:date>2020-04-30T19:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic regression with PROC GLIMMIX - specification of random statement w/ multiple random eff</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-with-PROC-GLIMMIX-specification-of-random/m-p/644372#M30903</link>
      <description>&lt;P&gt;COVTEST classical;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That should give a chi^2 test for each individual component, and&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;COVTEST zerog;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Should give a joint test that all of the variance components are zero.&amp;nbsp; If either of these leads to problems (like can't find a feasible starting set of parameters) try adding the RESTART option, so that the null model is fit from scratch, rather than from the fully fitted model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 19:28:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-with-PROC-GLIMMIX-specification-of-random/m-p/644372#M30903</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-04-30T19:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic regression with PROC GLIMMIX - specification of random statement w/ multiple random eff</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-with-PROC-GLIMMIX-specification-of-random/m-p/644378#M30904</link>
      <description>&lt;P&gt;Thanks Steve.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can get the covtest zerog working, although the covtest classical doesn't produce a covariance test result (the table remains limited to estimate and standard estimate). Could this be because the method is specified as laplace? (I get non-convergence if I leave the method unspecified).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc glimmix data=TXAHipA method=laplace;&lt;BR /&gt;class anesth surgeon sex admitCategory year;&lt;BR /&gt;effect age_spline = spline(age / details naturalcubic basis=tpf(noint) &lt;BR /&gt;knotmethod=percentiles(5));&lt;BR /&gt;effect Hb_spline = spline(Hb / details naturalcubic basis=tpf(noint) &lt;BR /&gt;knotmethod=percentiles(5));&lt;BR /&gt;model TXAstatus = age_spline Hb_spline sex admitCategory CS1 CS2 CS3 year / solution dist=binomial link=logit;&lt;BR /&gt;random anesth surgeon;&lt;BR /&gt;covtest / classical;&lt;BR /&gt;output out=glimmixout pred( blup ilink) = PredProb&lt;BR /&gt;pred(noblup ilink) = PredProb_PA;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Brett&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 20:03:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-with-PROC-GLIMMIX-specification-of-random/m-p/644378#M30904</guid>
      <dc:creator>bretthouston</dc:creator>
      <dc:date>2020-04-30T20:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic regression with PROC GLIMMIX - specification of random statement w/ multiple random eff</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-with-PROC-GLIMMIX-specification-of-random/m-p/644497#M30912</link>
      <description>&lt;P&gt;Remove the / before classical and see if that helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2020 11:42:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-with-PROC-GLIMMIX-specification-of-random/m-p/644497#M30912</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-05-01T11:42:01Z</dc:date>
    </item>
  </channel>
</rss>

