<?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: ROC curve in PROC logistic in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-in-PROC-logistic/m-p/355808#M18653</link>
    <description>&lt;P&gt;For the first part try modifying your code like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc logistic data=have (obs=50) ....&lt;/P&gt;
&lt;P&gt;to only use 50 observations (or other numbe much smaller than 23000). I suspect the "band" is actually coming from overlapping text labels&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have a Year variable? with 3 levels (if I understand the question)? adding Year to class and model and then perhaps the PLOTBY= option with the year variable might work&lt;/P&gt;</description>
    <pubDate>Wed, 03 May 2017 22:55:54 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-05-03T22:55:54Z</dc:date>
    <item>
      <title>ROC curve in PROC logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-in-PROC-logistic/m-p/355724#M18652</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a small problem with the look of my ROC curve. My dataset looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;company &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; total assets &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; city &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; flag&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 &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;32432 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Boston &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/P&gt;&lt;P&gt;2 &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;32213 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; New York &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/P&gt;&lt;P&gt;3 &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;12341 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Chicago &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/P&gt;&lt;P&gt;4 &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;32124 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;Boston &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/P&gt;&lt;P&gt;. &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&lt;/P&gt;&lt;P&gt;. &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&lt;/P&gt;&lt;P&gt;. &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&lt;/P&gt;&lt;P&gt;23626 &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;7563 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Chicago &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, we have observations on 23626 companies, with financials (there are more then just total assets), city and a flag, which says 0 if the company is not bankrupt or 1 if the company is bankrupt. So, i'm fitting a logistic regression, like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc logistic data=have plots(only)=(roc(id=obs) effect);&lt;BR /&gt;class city (ref='chicago') / param = ref;&lt;BR /&gt;model flag(event='1') = TA EAToTA city;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get a curve like the one attached. Why does my curve look like that? I thought it should only be a line and not some sort of band? Does it have something to do with the number of observations which is&amp;nbsp;&lt;SPAN&gt;23626 ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Furtheremore i would like to know how to get 3 curves in the same graph. As if i have 3 datasets, like the one above, and then two others with the same companies, just from a different year.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;yocrashi&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13774i386047792ECC68BD/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="ROC.jpg" title="ROC.jpg" /&gt;</description>
      <pubDate>Wed, 03 May 2017 21:25:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-in-PROC-logistic/m-p/355724#M18652</guid>
      <dc:creator>yocrachi</dc:creator>
      <dc:date>2017-05-03T21:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: ROC curve in PROC logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-in-PROC-logistic/m-p/355808#M18653</link>
      <description>&lt;P&gt;For the first part try modifying your code like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc logistic data=have (obs=50) ....&lt;/P&gt;
&lt;P&gt;to only use 50 observations (or other numbe much smaller than 23000). I suspect the "band" is actually coming from overlapping text labels&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have a Year variable? with 3 levels (if I understand the question)? adding Year to class and model and then perhaps the PLOTBY= option with the year variable might work&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 22:55:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-in-PROC-logistic/m-p/355808#M18653</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-05-03T22:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: ROC curve in PROC logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-in-PROC-logistic/m-p/355869#M18654</link>
      <description>&lt;P&gt;Actually, the band was coming from text labels!&lt;BR /&gt;&lt;BR /&gt;No, i don't have a year variable. My dataset is only from the year 2007. The other dataset is from the year 2003.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Do you know how to remove the labels? i have tried:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;proc logistic data=have plots(only)=(roc(id=obs) effect and plots=no label);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;class city (ref='chicago') / param = ref;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;model flag(event='1') = TA EAToTA city;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;proc logistic data=have plots(only)=(roc(id=obs) effect);&lt;BR /&gt;class city (ref='chicago') / param = ref;&lt;BR /&gt;model flag(event='1') = TA EAToTA city /&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;plots=no label;&lt;BR /&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;but this dosn't work.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 07:51:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-in-PROC-logistic/m-p/355869#M18654</guid>
      <dc:creator>yocrachi</dc:creator>
      <dc:date>2017-05-04T07:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: ROC curve in PROC logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-in-PROC-logistic/m-p/356167#M18671</link>
      <description>&lt;P&gt;You can actually send the data used for the chart to an output data set and then use another procedure such as SGPLOT to display data where you have more options.&lt;/P&gt;
&lt;P&gt;IIRC use something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;ODS OUTPUT graphname=yourdatasetname;&lt;/P&gt;
&lt;P&gt;where graphname is the format name that SAS uses for the procedure such as ROCCurve or ROCOverlay and then the data set you want.&lt;/P&gt;
&lt;P&gt;In SGPLOT don't include data labels&amp;nbsp; and you should be close.&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 22:56:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-in-PROC-logistic/m-p/356167#M18671</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-05-04T22:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: ROC curve in PROC logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-in-PROC-logistic/m-p/356280#M18679</link>
      <description>&lt;P&gt;I think the problem is that you are using&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;ROC(ID=obs)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The ID= option labels the point. &lt;A href="http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_logistic_syntax01.htm" target="_self"&gt;See the LOGISTIC doc for information about the ID= option&lt;/A&gt;,:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To follow up on Ballardw's&amp;nbsp;suggestion, see the example &lt;A href="http://blogs.sas.com/content/iml/2012/08/01/data-fro-ods-graphics.html" target="_self"&gt;"How to get data values out of ODS graphics."&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2017 09:21:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-in-PROC-logistic/m-p/356280#M18679</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-05-05T09:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: ROC curve in PROC logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-in-PROC-logistic/m-p/356534#M18690</link>
      <description>&lt;P&gt;Thank you both for your answers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Actually, i used &amp;nbsp;"/ outroc=something" and i got the curve withut labels.&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2017 20:14:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-in-PROC-logistic/m-p/356534#M18690</guid>
      <dc:creator>yocrachi</dc:creator>
      <dc:date>2017-05-05T20:14:51Z</dc:date>
    </item>
  </channel>
</rss>

