<?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: associate predicted probability with parameter values in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56750#M2617</link>
    <description>I've already tried, I tried everything I can think of.&lt;BR /&gt;
I need to do this because that's the way my data must be interpreted and handled, it's not for fun but because of the biological background &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;</description>
    <pubDate>Wed, 28 Jul 2010 19:00:07 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-07-28T19:00:07Z</dc:date>
    <item>
      <title>ROC curve: associate predicted probability with parameter values</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56746#M2613</link>
      <description>Hi,&lt;BR /&gt;
I'm using Proc Logistic to create a ROC curve; I have the Y variable which codifies the event of interest (cells differentiation, 1 = event = differentiation; 0 = non-event = non-differentiation) and the X independent variable which is a parameter measuring the differentiation level.&lt;BR /&gt;
&lt;BR /&gt;
Here is the code:&lt;BR /&gt;
&lt;BR /&gt;
proc logistic data=total descending noprint;&lt;BR /&gt;
model Y=X / outroc=rocdata_sptot;&lt;BR /&gt;
output out=sptot1 p=predprob;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
After that, I define a cut-off on the X to distinguish between events and non-events.&lt;BR /&gt;
&lt;BR /&gt;
The correct interpretation of my data is: the higher the X, the higher the probability of differentiation (event=1); but the interpretation given by SAS is the opposite (i.e. the higher the X, the lower the probability of differentiation). I checked it in the out dataset, where a lower probability of event is associated to higher levels of my X.&lt;BR /&gt;
&lt;BR /&gt;
Is there a statement or any other solution I can use to "reverse" the association done by SAS, in order to make it correctly fit my data?&lt;BR /&gt;
&lt;BR /&gt;
Thanks a lot,&lt;BR /&gt;
Anna</description>
      <pubDate>Wed, 28 Jul 2010 11:04:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56746#M2613</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-07-28T11:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: ROC curve: associate predicted probability with parameter values</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56747#M2614</link>
      <description>Hi Anna,&lt;BR /&gt;
&lt;BR /&gt;
Try this:&lt;BR /&gt;
&lt;BR /&gt;
proc logistic data=total descending noprint;&lt;BR /&gt;
model Y(event='1')=X / outroc=rocdata_sptot;&lt;BR /&gt;
output out=sptot1 p=predprob;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
The way I read the documentation, this should give what you need.&lt;BR /&gt;
&lt;BR /&gt;
Steve Denham</description>
      <pubDate>Wed, 28 Jul 2010 12:10:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56747#M2614</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2010-07-28T12:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: ROC curve: associate predicted probability with parameter values</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56748#M2615</link>
      <description>Dear Steve,&lt;BR /&gt;
thank you very much for your answer.&lt;BR /&gt;
I tried what you suggested but I still have the same results as before: SAS is still associating low values of predicted probability to high values of X, and I need the opposite.&lt;BR /&gt;
I also tried with some variations but the results don't change.&lt;BR /&gt;
Many thanks for your help anyway &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Wed, 28 Jul 2010 14:43:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56748#M2615</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-07-28T14:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: ROC curve: associate predicted probability with parameter values</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56749#M2616</link>
      <description>then Don't use 'descending'.&lt;BR /&gt;
But i am curious that Why you do want to do that?</description>
      <pubDate>Wed, 28 Jul 2010 16:00:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56749#M2616</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2010-07-28T16:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: ROC curve: associate predicted probability with parameter values</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56750#M2617</link>
      <description>I've already tried, I tried everything I can think of.&lt;BR /&gt;
I need to do this because that's the way my data must be interpreted and handled, it's not for fun but because of the biological background &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;</description>
      <pubDate>Wed, 28 Jul 2010 19:00:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56750#M2617</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-07-28T19:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: ROC curve: associate predicted probability with parameter values</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56751#M2618</link>
      <description>I've got to think that this has something to do with the model or the data.  &lt;BR /&gt;
&lt;BR /&gt;
Have you done plots of the raw data?  Maybe your putative biological model isn't reflected in the data.  (SAS 9.2's ODS statistical graphics has some that are quite useful.  Also, see Frank Harrell's book on regression modeling for diagnostics.)&lt;BR /&gt;
&lt;BR /&gt;
Have you simplified the model for the presentation here?  E.g. are there other covariables in the model?  If so, and they are related to X, they can attenuate or even reverse the effect of X.&lt;BR /&gt;
&lt;BR /&gt;
Doc Muhlbaier&lt;BR /&gt;
Duke</description>
      <pubDate>Thu, 29 Jul 2010 01:57:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56751#M2618</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2010-07-29T01:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: ROC curve: associate predicted probability with parameter values</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56752#M2619</link>
      <description>Hi.Anna.&lt;BR /&gt;
I think Doc@Duck has the right idea here.That is to say you need more covariates to add into your model or need more obs.Your logistic model is perfect prediction(i.e. you only have one outcome variable and one covariate).The perfect prediction is not a good model which will give your not good estimate and interpretation. I think SAS will issue a NOTE in the log file.

Message was edited by: Ksharp</description>
      <pubDate>Thu, 29 Jul 2010 10:45:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56752#M2619</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2010-07-29T10:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: ROC curve: associate predicted probability with parameter values</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56753#M2620</link>
      <description>Ksharp mentioned perfect prediction.  You won't get that unless there is total separation of the y's by the x's.  We have, however, been assuming that X is a continuous variable.  Although a logistic regression can be done with a single binary predictor, it is then just a Chi Square and the ROC is pretty meaningless.</description>
      <pubDate>Thu, 29 Jul 2010 12:56:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56753#M2620</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2010-07-29T12:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: ROC curve: associate predicted probability with parameter values</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56754#M2621</link>
      <description>Anna,&lt;BR /&gt;
&lt;BR /&gt;
If the descending option is kept, then at least try:&lt;BR /&gt;
&lt;BR /&gt;
proc logistic data=total descending noprint;&lt;BR /&gt;
model Y(event='0')=X / outroc=rocdata_sptot;&lt;BR /&gt;
output out=sptot1 p=predprob;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Good luck,&lt;BR /&gt;
&lt;BR /&gt;
Steve Denham</description>
      <pubDate>Thu, 29 Jul 2010 14:11:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56754#M2621</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2010-07-29T14:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: ROC curve: associate predicted probability with parameter values</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56755#M2622</link>
      <description>Hi.Doc@Duke&lt;BR /&gt;
I guess that the sample size is too small or the events are too sparse.So the estimation of coefficient would be bias.&lt;BR /&gt;
So anna You can try to use exact logistic regression .Such as:&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc logistic  data=yourdataset descending exactonly;&lt;BR /&gt;
  model Y=X Z;&lt;BR /&gt;
  exact X  Z /estimate=both;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Thu, 29 Jul 2010 15:35:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56755#M2622</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2010-07-29T15:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: ROC curve: associate predicted probability with parameter values</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56756#M2623</link>
      <description>Dear All,&lt;BR /&gt;
many thanks for your help!&lt;BR /&gt;
I'm currently working on the problem, considering all your suggestions &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Mon, 02 Aug 2010 08:12:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56756#M2623</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-08-02T08:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: ROC curve: associate predicted probability with parameter values</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56757#M2624</link>
      <description>Hi again,&lt;BR /&gt;
I'm going crazy with this issue, again, I wasn't able to solve it in any way.&lt;BR /&gt;
The problem is quite simple, I tried all the possible combinations but I can never find the right one.&lt;BR /&gt;
&lt;BR /&gt;
** I am using proc logistic to build a ROC curve.&lt;BR /&gt;
** I have a binary "event" variable (dependent). The two categories correspond to Differentiation and Undifferentiation.&lt;BR /&gt;
** I have only 1 continuous predictor (independent)&lt;BR /&gt;
** The right intrerpretation of the data is: the higher the predictor, the higher the differentiation &lt;BR /&gt;
&lt;BR /&gt;
I tried all the combinations obtained changing the way of codifying the event (what it's coded as 0 and what as 1), and the event for which the probability of the logistic model is modeled. I will list them here:&lt;BR /&gt;
&lt;BR /&gt;
1) Differentiated = 0&lt;BR /&gt;
    Undifferentiated = 1&lt;BR /&gt;
    Event for which probability is modeled = 1&lt;BR /&gt;
------&amp;gt; RESULT: the higher the predictor, the higher the prob of UNdiffer --&amp;gt; WRONG&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
2) Differ = 0&lt;BR /&gt;
   Undiffer = 1&lt;BR /&gt;
   Event = 0&lt;BR /&gt;
------&amp;gt; RESULT: the higher the predictor, the lower the probability of Differ --&amp;gt; WRONG&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
3) Differ = 1&lt;BR /&gt;
   Undiffer = 0&lt;BR /&gt;
   Event = 1&lt;BR /&gt;
-------&amp;gt; RESULT: the higher the predictor, the lower the prob of Differ --&amp;gt; WRONG&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
4) Differ = 1&lt;BR /&gt;
   Undiff = 0&lt;BR /&gt;
   Event = 0&lt;BR /&gt;
------&amp;gt; RESULT: the higher the predictor, the higher the prob of UNdiff --&amp;gt; WRONG&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Do you think it's normal?&lt;BR /&gt;
I'm convinced there must be something very wrong but I really don't know what to do.&lt;BR /&gt;
Thanks again,&lt;BR /&gt;
Anna</description>
      <pubDate>Wed, 11 Aug 2010 14:20:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56757#M2624</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-08-11T14:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: ROC curve: associate predicted probability with parameter values</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56758#M2625</link>
      <description>Hello Anna,&lt;BR /&gt;
&lt;BR /&gt;
If you could supply a sample of you data to experiment?&lt;BR /&gt;
&lt;BR /&gt;
SPR</description>
      <pubDate>Thu, 07 Oct 2010 20:01:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ROC-curve-associate-predicted-probability-with-parameter-values/m-p/56758#M2625</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2010-10-07T20:01:48Z</dc:date>
    </item>
  </channel>
</rss>

