<?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 ROC doesn't improve between GLIMMIX models, despite significant predictors &amp;amp; improving fit measures in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-doesn-t-improve-between-GLIMMIX-models-despite-significant/m-p/735138#M35670</link>
    <description>&lt;P&gt;I'm building random intercept models (null, level-1, level-2, and combined) and the ROC curve is ~.97 for all of these models, though the fit indices (AIC, -2LL) do improve with each model. I'm using various patient and encounter-level characteristics to predict restraint use in the emergency department. The outcome is binary and all predictors are binary or categorical. Hospital admissions (~n=32,000) are nested within patients (~n=19,000). Can someone help me understand why, for example the ROC curve for the below null model is almost the same as the full model following it? I'm using the predicted probabilities from the model output to get the ROC in Proc Logistic, as covered here (&lt;A href="https://blogs.sas.com/content/iml/2018/11/14/compare-roc-curves-sas.html" target="_self"&gt;here&lt;/A&gt;). Most of the predictors are statistically significant.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix data=data method=quad empirical=classical;
nloptions gconv=0 tech=nrridg;
 class PatID ;
model Restraint (descending)=  / CL DIST=BINARY LINK=LOGIT SOLUTION;
random intercept / subject=PatID;
output out=null_out pred=xbeta pred(ilink)=predprob; 
run;
/*****/
proc logistic data=null_out;
 model Restraint(descending)= predprob/ nofit; 
 roc 'GLIMMIX null model' pred=predprob ;
 run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix data=data  METHOD=quad empirical=classical ;
nloptions gconv=0 tech=nrridg;
CLASS 
    Var1 Var2 Var3 Var4 Var5 ;
model Restraint(descending)= 
   Var1 Var2 Var3 Var4 Var5
    / CL DIST=BINARY LINK=LOGIT SOLUTION ODDSRATIO ;
random intercept / subject=PatID ;
output out=full_out pred=xbeta pred(ilink)=predprob; 
run;

/* ROC*/
 proc logistic data=full_out;
 model Restraint(descending)= predprob/ nofit; 
 roc 'GLIMMIX full model' pred=predprob ;
 run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 18 Apr 2021 22:56:51 GMT</pubDate>
    <dc:creator>NMB82</dc:creator>
    <dc:date>2021-04-18T22:56:51Z</dc:date>
    <item>
      <title>ROC doesn't improve between GLIMMIX models, despite significant predictors &amp; improving fit measures</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-doesn-t-improve-between-GLIMMIX-models-despite-significant/m-p/735138#M35670</link>
      <description>&lt;P&gt;I'm building random intercept models (null, level-1, level-2, and combined) and the ROC curve is ~.97 for all of these models, though the fit indices (AIC, -2LL) do improve with each model. I'm using various patient and encounter-level characteristics to predict restraint use in the emergency department. The outcome is binary and all predictors are binary or categorical. Hospital admissions (~n=32,000) are nested within patients (~n=19,000). Can someone help me understand why, for example the ROC curve for the below null model is almost the same as the full model following it? I'm using the predicted probabilities from the model output to get the ROC in Proc Logistic, as covered here (&lt;A href="https://blogs.sas.com/content/iml/2018/11/14/compare-roc-curves-sas.html" target="_self"&gt;here&lt;/A&gt;). Most of the predictors are statistically significant.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix data=data method=quad empirical=classical;
nloptions gconv=0 tech=nrridg;
 class PatID ;
model Restraint (descending)=  / CL DIST=BINARY LINK=LOGIT SOLUTION;
random intercept / subject=PatID;
output out=null_out pred=xbeta pred(ilink)=predprob; 
run;
/*****/
proc logistic data=null_out;
 model Restraint(descending)= predprob/ nofit; 
 roc 'GLIMMIX null model' pred=predprob ;
 run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix data=data  METHOD=quad empirical=classical ;
nloptions gconv=0 tech=nrridg;
CLASS 
    Var1 Var2 Var3 Var4 Var5 ;
model Restraint(descending)= 
   Var1 Var2 Var3 Var4 Var5
    / CL DIST=BINARY LINK=LOGIT SOLUTION ODDSRATIO ;
random intercept / subject=PatID ;
output out=full_out pred=xbeta pred(ilink)=predprob; 
run;

/* ROC*/
 proc logistic data=full_out;
 model Restraint(descending)= predprob/ nofit; 
 roc 'GLIMMIX full model' pred=predprob ;
 run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 18 Apr 2021 22:56:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-doesn-t-improve-between-GLIMMIX-models-despite-significant/m-p/735138#M35670</guid>
      <dc:creator>NMB82</dc:creator>
      <dc:date>2021-04-18T22:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: ROC doesn't improve between GLIMMIX models, despite significant predictors &amp; improving fit m</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-doesn-t-improve-between-GLIMMIX-models-despite-significant/m-p/735257#M35682</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Models.jpg" style="width: 701px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/58313i4AADCA0B2FB33C18/image-size/large?v=v2&amp;amp;px=999" role="button" title="Models.jpg" alt="Models.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 14:17:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-doesn-t-improve-between-GLIMMIX-models-despite-significant/m-p/735257#M35682</guid>
      <dc:creator>NMB82</dc:creator>
      <dc:date>2021-04-19T14:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: ROC doesn't improve between GLIMMIX models, despite significant predictors &amp; improving fit m</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-doesn-t-improve-between-GLIMMIX-models-despite-significant/m-p/735292#M35685</link>
      <description>&lt;P&gt;I am struggling to understand how a null model with no predictors can get an area under the curve of 0.97. I assume that because you use a random intercept, that the different patients in the random intercept are producing such a high area under the curve.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And so the other models don't improve the area under the curve because the best predictor is patient ID is the best predictor by far, even though the additional variables might be statistically significant.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Either that or you have such a very small percentage of values of Restraint that are 1 and a very huge percentage of values of Restraint that are 0, and so in that case, the null model ought to fit well.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 15:27:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-doesn-t-improve-between-GLIMMIX-models-despite-significant/m-p/735292#M35685</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-04-19T15:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: ROC doesn't improve between GLIMMIX models, despite significant predictors &amp; improving fit m</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-doesn-t-improve-between-GLIMMIX-models-despite-significant/m-p/735304#M35686</link>
      <description>&lt;P&gt;Thank you...I was thinking the same regarding the 1st part....that the biggest predictor of restraint use would simply be the patient. As far as your 2nd point, this is somewhat of a rare event, the outcome is binary with ~8% of encounters resulting in a restraint. This being the case, is the ROC even the best measure of predictive ability for such a model? Is there a better measure I should try?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 15:55:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-doesn-t-improve-between-GLIMMIX-models-despite-significant/m-p/735304#M35686</guid>
      <dc:creator>NMB82</dc:creator>
      <dc:date>2021-04-19T15:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: ROC doesn't improve between GLIMMIX models, despite significant predictors &amp; improving fit m</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-doesn-t-improve-between-GLIMMIX-models-despite-significant/m-p/735378#M35690</link>
      <description>&lt;P&gt;The following SGF paper has brief discussion (pages 8-9)&amp;nbsp;on ROC curves for binary GLIMMIX models that might be helpful to you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2018/2179-2018.pdf" target="_blank"&gt;https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2018/2179-2018.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 22:13:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-doesn-t-improve-between-GLIMMIX-models-despite-significant/m-p/735378#M35690</guid>
      <dc:creator>STAT_Kathleen</dc:creator>
      <dc:date>2021-04-19T22:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: ROC doesn't improve between GLIMMIX models, despite significant predictors &amp; improving fit m</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-doesn-t-improve-between-GLIMMIX-models-despite-significant/m-p/735566#M35710</link>
      <description>&lt;P&gt;Thank you! Is there a guide to calculate the precision-recall curve?&amp;nbsp; I don't see this available in Proc Logistic. Or, at least, a confusion matrix?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 14:17:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-doesn-t-improve-between-GLIMMIX-models-despite-significant/m-p/735566#M35710</guid>
      <dc:creator>NMB82</dc:creator>
      <dc:date>2021-04-20T14:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: ROC doesn't improve between GLIMMIX models, despite significant predictors &amp; improving fit m</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-doesn-t-improve-between-GLIMMIX-models-despite-significant/m-p/735612#M35713</link>
      <description>&lt;P&gt;The precision (positive predictive value or PPV) and the recall (sensitivity) are both available from the CTABLE option in PROC LOGISTIC. You can save that table using an ODS OUTPUT statement and then create the precision-recall plot. Using the example for the GLIMMIX model in &lt;A href="http://support.sas.com/kb/41364" target="_self"&gt;this note&lt;/A&gt;, the following statements create the plot. The reference line is at the overall observed event rate (155/503).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=glmmout;
   model sideeffect/n = predprob / ctable; 
   ods output classification=ctable;
   run;
proc sgplot data=ctable noautolegend aspect=1;
   xaxis values=(0 to 100 by 25) grid offsetmin=.05 offsetmax=.05; 
   yaxis values=(0 to 100 by 25) grid offsetmin=.05 offsetmax=.05;
   refline 31;
   series y=ppv x=sensitivity;
   title "Precision-Recall Curve";
   run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Apr 2021 15:24:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-doesn-t-improve-between-GLIMMIX-models-despite-significant/m-p/735612#M35713</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2021-04-20T15:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: ROC doesn't improve between GLIMMIX models, despite significant predictors &amp; improving fit m</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-doesn-t-improve-between-GLIMMIX-models-despite-significant/m-p/735662#M35716</link>
      <description>&lt;P&gt;Thank you for this! I'm unclear where the "&lt;SPAN&gt;(155/503)" comes from, as it's not in the link provided. I assume this means the event rate (event/total observations)? Also, the variable ppv is not in the ctable output. I believe this refers to positive predicted value or precision...how would that be calculated with the variables in the ctable output are below?&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ctable.jpg" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/58399i422E3DF8C68E53EC/image-size/large?v=v2&amp;amp;px=999" role="button" title="ctable.jpg" alt="ctable.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 16:42:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-doesn-t-improve-between-GLIMMIX-models-despite-significant/m-p/735662#M35716</guid>
      <dc:creator>NMB82</dc:creator>
      <dc:date>2021-04-20T16:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: ROC doesn't improve between GLIMMIX models, despite significant predictors &amp; improving fit m</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-doesn-t-improve-between-GLIMMIX-models-despite-significant/m-p/735668#M35717</link>
      <description>&lt;P&gt;If you run the example in the note, you will see that the count of events is 155 and the total count is 503. So, the overall event rate is 155/503. The PPV is in the CTABLE option output and is the Percentage column labeled Pos Pred. If you don't see that column, then you probably need to upgrade your SAS release to the current SAS 9.4 TS1M7.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 16:54:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-doesn-t-improve-between-GLIMMIX-models-despite-significant/m-p/735668#M35717</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2021-04-20T16:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: ROC doesn't improve between GLIMMIX models, despite significant predictors &amp; improving fit m</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-doesn-t-improve-between-GLIMMIX-models-despite-significant/m-p/735672#M35718</link>
      <description>&lt;P&gt;Ok, that makes sense. I'm not seeing that variable, so I'll likely need to upgrade or figure out a different approach. It's a work computer, so I've gotta hassle IT for an upgrade...ugh.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 17:00:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-doesn-t-improve-between-GLIMMIX-models-despite-significant/m-p/735672#M35718</guid>
      <dc:creator>NMB82</dc:creator>
      <dc:date>2021-04-20T17:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: ROC doesn't improve between GLIMMIX models, despite significant predictors &amp; improving fit m</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-doesn-t-improve-between-GLIMMIX-models-despite-significant/m-p/735674#M35719</link>
      <description>You can easily compute the PPV from two other columns in the table: ppv = (correct event) / (correct event+incorrect event) .</description>
      <pubDate>Tue, 20 Apr 2021 17:03:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-doesn-t-improve-between-GLIMMIX-models-despite-significant/m-p/735674#M35719</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2021-04-20T17:03:52Z</dc:date>
    </item>
  </channel>
</rss>

