<?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 Estimation of AUC with proc logistic in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-AUC-with-proc-logistic/m-p/13012#M211</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By the way,&amp;nbsp; I determined which PROC run was correct by outputting the ROC curve by using the OUTROC= option and then using the trapezoidal rule to integrate the AUC.&amp;nbsp; You can read about this process in my article "&lt;A href="http://blogs.sas.com/content/iml/2011/06/03/a-statistical-application-of-numerical-integration-the-area-under-an-roc-curve/"&gt;A statistical application of numerical integration: The area under an ROC curve&lt;/A&gt;." You can also use SAS/IML to &lt;A href="http://blogs.sas.com/content/iml/2011/07/29/computing-an-roc-curve-from-basic-principles/"&gt;compute the ROC curve from basic principles&lt;/A&gt;.&amp;nbsp; It's a good way to understand what PROC LOGISTIC is doing "under the hood."&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Feb 2012 20:12:58 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2012-02-27T20:12:58Z</dc:date>
    <item>
      <title>Estimation of AUC with proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-AUC-with-proc-logistic/m-p/13009#M208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I'm trying to estimate the AUC of ROC with Proc Logistic.&lt;/P&gt;&lt;P&gt;However the c-statistic estimated without using ROC statement differs from the AUC estimated with using ROC statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where does the difference come from?&lt;/P&gt;&lt;P&gt;Are those estimates caluculated using different technics?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd really appreciate it if anyone would help me.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yasu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*-Sample Code-*/&lt;/P&gt;&lt;P&gt;data roc;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; input alb tp totscore popind @@;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; totscore = 10 - totscore;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; datalines;&lt;BR /&gt;3.0 5.8 10 0&amp;nbsp;&amp;nbsp; 3.2 6.3&amp;nbsp; 5 1&amp;nbsp;&amp;nbsp; 3.9 6.8&amp;nbsp; 3 1&amp;nbsp;&amp;nbsp; 2.8 4.8&amp;nbsp; 6 0&amp;nbsp;&amp;nbsp; &lt;BR /&gt;3.2 5.8&amp;nbsp; 3 1&amp;nbsp;&amp;nbsp; 0.9 4.0&amp;nbsp; 5 0&amp;nbsp;&amp;nbsp; 2.5 5.7&amp;nbsp; 8 0&amp;nbsp;&amp;nbsp; 1.6 5.6&amp;nbsp; 5 1&amp;nbsp;&amp;nbsp; &lt;BR /&gt;3.8 5.7&amp;nbsp; 5 1&amp;nbsp;&amp;nbsp; 3.7 6.7&amp;nbsp; 6 1&amp;nbsp;&amp;nbsp; 3.2 5.4&amp;nbsp; 4 1&amp;nbsp;&amp;nbsp; 3.8 6.6&amp;nbsp; 6 1&amp;nbsp;&amp;nbsp; &lt;BR /&gt;4.1 6.6&amp;nbsp; 5 1&amp;nbsp;&amp;nbsp; 3.6 5.7&amp;nbsp; 5 1&amp;nbsp;&amp;nbsp; 4.3 7.0&amp;nbsp; 4 1&amp;nbsp;&amp;nbsp; 3.6 6.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bsp; &lt;BR /&gt;3.3 5.7&amp;nbsp; 6 1&amp;nbsp;&amp;nbsp; 3.7 6.9&amp;nbsp; 5 1&amp;nbsp;&amp;nbsp; 3.6 6.6&amp;nbsp; 5 1&amp;nbsp;&amp;nbsp; &lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*PRG1*/&lt;BR /&gt;proc logistic data=roc;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; model popind(event='0') = alb tp;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*PRG2*/&lt;BR /&gt;proc logistic data=roc;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; model popind(event='0') = alb tp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; roc 'two' alb tp;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2012 10:23:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-AUC-with-proc-logistic/m-p/13009#M208</guid>
      <dc:creator>Yasu</dc:creator>
      <dc:date>2012-02-24T10:23:01Z</dc:date>
    </item>
    <item>
      <title>Estimation of AUC with proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-AUC-with-proc-logistic/m-p/13010#M209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; It is not just the ROC, or c value.&amp;nbsp; All of the measures of association change when the ROC statement is included--all are slightly smaller in this case.&amp;nbsp; I could not find a reference in the documentation to explain why this is the case.&amp;nbsp; Hopefully someone (say Rick) will drop in and give us some clues as to what is going on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 17:57:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-AUC-with-proc-logistic/m-p/13010#M209</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2012-02-27T17:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: Estimation of AUC with proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-AUC-with-proc-logistic/m-p/13011#M210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been summoned....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interesting. I wasn't aware of this behavior before, but from some experimentation I discovered that you can get PGM1 to give the same answer as PGM2 if you invoke ODS GRAPHICS ON and ask for PLOTS(ONLY)=ROCPLOT.&amp;nbsp; This tell us that creating a ROC plot is changing the AUC algorithm somehow, and that the ROC statement changes the algorithm in the same way. By scanning the LOGISTIC doc, I narrowed in on either the ROCEPS= or BINWIDTH= option as the option that is causing the change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further experimentation reveals that it is the &lt;A href="http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_logistic_sect016.htm"&gt;BINWIDTH= option&lt;/A&gt; that is causing the difference in the two PROC runs.&amp;nbsp; You can read about the reasons in the doc or in this &lt;A href="http://support.sas.com/kb/45/767.html"&gt;USAGE NOTE&lt;/A&gt;, but I'll summarize what I think is happening in a few sentences: In the "old days" PROC LOGISTIC used an &lt;EM&gt;estimate &lt;/EM&gt;of the AUC that corresponds to BINWIDTH=0.002. When ODS graphics came around and the ROC statement was added, computational power had increased that it was feasible to compute an exact AUC, so BINWIDTH=0 is used for these new features. But because SAS doesn't like to make changes that might affect someone's benchmarks/existing programs, the default value of 0.002 was retained for the case when ODS graphics are off and you don't use the ROC statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the answer is: PGM1 is an estimate, PGM2 is exact, and you can get PGM1 to give the exact answer by putting BINWIDTH=0 on the MODEL stmt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rick&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Rick Wicklin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 20:02:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-AUC-with-proc-logistic/m-p/13011#M210</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2012-02-27T20:02:28Z</dc:date>
    </item>
    <item>
      <title>Estimation of AUC with proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-AUC-with-proc-logistic/m-p/13012#M211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By the way,&amp;nbsp; I determined which PROC run was correct by outputting the ROC curve by using the OUTROC= option and then using the trapezoidal rule to integrate the AUC.&amp;nbsp; You can read about this process in my article "&lt;A href="http://blogs.sas.com/content/iml/2011/06/03/a-statistical-application-of-numerical-integration-the-area-under-an-roc-curve/"&gt;A statistical application of numerical integration: The area under an ROC curve&lt;/A&gt;." You can also use SAS/IML to &lt;A href="http://blogs.sas.com/content/iml/2011/07/29/computing-an-roc-curve-from-basic-principles/"&gt;compute the ROC curve from basic principles&lt;/A&gt;.&amp;nbsp; It's a good way to understand what PROC LOGISTIC is doing "under the hood."&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 20:12:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-AUC-with-proc-logistic/m-p/13012#M211</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2012-02-27T20:12:58Z</dc:date>
    </item>
    <item>
      <title>Estimation of AUC with proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-AUC-with-proc-logistic/m-p/13013#M212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Now that is what I call an answer! Thanks Rick. I hope the OP puts this in the Correct Answer category. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had a dime on ROCEPS, and would have lost.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other PROCs affected by this change with ODS GRAPHICS ON?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 20:47:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-AUC-with-proc-logistic/m-p/13013#M212</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2012-02-27T20:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: Estimation of AUC with proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-AUC-with-proc-logistic/m-p/13014#M213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was mistaken when I originally said you get different answers if you turn on ODS GRAPHICS. It's actually asking for the ROCPLOT that causes the different behavior. I have inserted the clause "and ask for PLOTS(ONLY)=ROCPLOT" into my original answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know of any other procedures that give different answers when a graph is requested, but I didn't know about this one until today.&amp;nbsp; You'll can check with Technical Support if you want an "official" answer to that question.&amp;nbsp; My answers are all unofficial and shouldn't be given any more weight than you'd give to anyone else.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 21:05:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-AUC-with-proc-logistic/m-p/13014#M213</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2012-02-27T21:05:48Z</dc:date>
    </item>
    <item>
      <title>Estimation of AUC with proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-AUC-with-proc-logistic/m-p/13015#M214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Mr.Rick and Mr.Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really appreciate your kind and fast response!&lt;/P&gt;&lt;P&gt;I've also conducted some experiments and reached&amp;nbsp; the same conclusion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll check with SAS tech suport about this issue.&lt;/P&gt;&lt;P&gt;When I get some information, I'll share it on this thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your continued support.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yasu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 00:35:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-AUC-with-proc-logistic/m-p/13015#M214</guid>
      <dc:creator>Yasu</dc:creator>
      <dc:date>2012-03-01T00:35:15Z</dc:date>
    </item>
  </channel>
</rss>

