<?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: Proc Logistic Score using other than 0.5 as the cut point. in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-Score-using-other-than-0-5-as-the-cut-point/m-p/602609#M29296</link>
    <description>&lt;P&gt;pprob option?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the docs:&amp;nbsp;&lt;A href="https://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#statug_logistic_sect063.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#statug_logistic_sect063.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=Screen;
   freq Count;
   model Disease(event='Present')=Test 
         / pevent=.5 .01 ctable pprob=.5;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;...&lt;/P&gt;&lt;P&gt;-unison&lt;/P&gt;</description>
    <pubDate>Thu, 07 Nov 2019 20:33:18 GMT</pubDate>
    <dc:creator>unison</dc:creator>
    <dc:date>2019-11-07T20:33:18Z</dc:date>
    <item>
      <title>Proc Logistic Score using other than 0.5 as the cut point.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-Score-using-other-than-0-5-as-the-cut-point/m-p/602589#M29295</link>
      <description>&lt;P&gt;I have been searching for this and cannot find an answer so it may not be possible.&lt;/P&gt;
&lt;P&gt;Using PC SAS 9.4&lt;/P&gt;
&lt;P&gt;I know that if you run Proc Logistic with the&amp;nbsp; CTABLE&amp;nbsp; and PPROB=()&amp;nbsp; that&amp;nbsp; you can generate a classification table across several probabilities to use as the cut over between a 0 or 1 outcome.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to figure out how to get Score to score the model using a particular probability as the cut point.&amp;nbsp; It appears to me that score is always using the 0.5 as the cut point.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this a parameter into the score portion or do I need to run proc logistic with a pprob set to a single value and that is incorporated into the model output for scoring?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am teaching a class, this came up as a question and I have been racking my brain on this one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 20:21:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-Score-using-other-than-0-5-as-the-cut-point/m-p/602589#M29295</guid>
      <dc:creator>slaurett</dc:creator>
      <dc:date>2019-11-07T20:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic Score using other than 0.5 as the cut point.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-Score-using-other-than-0-5-as-the-cut-point/m-p/602609#M29296</link>
      <description>&lt;P&gt;pprob option?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the docs:&amp;nbsp;&lt;A href="https://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#statug_logistic_sect063.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#statug_logistic_sect063.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=Screen;
   freq Count;
   model Disease(event='Present')=Test 
         / pevent=.5 .01 ctable pprob=.5;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;...&lt;/P&gt;&lt;P&gt;-unison&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 20:33:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-Score-using-other-than-0-5-as-the-cut-point/m-p/602609#M29296</guid>
      <dc:creator>unison</dc:creator>
      <dc:date>2019-11-07T20:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic Score using other than 0.5 as the cut point.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-Score-using-other-than-0-5-as-the-cut-point/m-p/602740#M29298</link>
      <description>&lt;P&gt;The SCORE statement always produces the predicted classification (in the F_&lt;EM&gt;response&amp;nbsp;&lt;/EM&gt;variable) by selecting the level with the maximum predicted probability. For a binary response, this is equivalent to using 0.5 as the cutoff. If you want the predicted classification to use a different cutoff, then simply follow the PROC LOGISTIC step with a DATA step and compute it as desired. For example, if the SCORE statement in your PROC LOGISTIC step produces a scored data set named MyOut, then this DATA step will compute the predicted classifications (in variable Pred) using 0.6 as the cutoff assuming that your response variable is named Y:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data MyOut; 
  set MyOut;
  Pred = (P_Y &amp;gt;= 0.6);
  run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Nov 2019 14:53:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-Score-using-other-than-0-5-as-the-cut-point/m-p/602740#M29298</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2019-11-08T14:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic Score using other than 0.5 as the cut point.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-Score-using-other-than-0-5-as-the-cut-point/m-p/602815#M29300</link>
      <description>&lt;P&gt;I assume you are using the SCORE statement in PROC LOGISTIC?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IMHO, you might consider teaching your students to use PROC PLM. There are &lt;A href="https://blogs.sas.com/content/iml/2019/02/11/proc-plm-regression-models-sas.html" target="_self"&gt;many reasons to prefer PROC PLM over PROC SCORE&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regardless, suppose you use the SCORE statement or the STORE statement and PROC PLM to create a score data set. The data set has a variable for the predicted probability of the event. The name will be something like P_&lt;EM&gt;Event&lt;/EM&gt; for the SCORE statement and will be&amp;nbsp; Predicted for PROC PLM output. You can write a data step that creates a binary variable that contains the predicted class, based on the predicted probability.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, the following code uses the Neuralgia data in the PROC LOGISTIC documentation:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title 'Logistic Model on Neuralgia';
proc logistic data=Neuralgia;
   class Sex Treatment;
   model Pain(Event='Yes')= Sex Age Duration Treatment;
   score data=NewPatients out=LogiScore ;
   store PainModel / label='Neuralgia Study';  /* or use mylib.PaimModel for permanent storage */
run;

proc plm restore=PainModel;
   score data=NewPatients out=NewScore predicted / ilink; /* ILINK gives probabilities */
run;
 
proc print data=NewScore;
run;

/* Create the Pred_Pain variable, which has values 'Yes' or 'No' depending
   on whether the predicted probability of 'Yes' is greater than the cutoff values */
data ScoreCutpt;
cutpoint = 0.5;
set NewScore;
if Predicted &amp;gt; cutpoint then 
   Pred_Pain = 'Yes';
else Pred_Pain = 'No ';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Nov 2019 19:10:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-Score-using-other-than-0-5-as-the-cut-point/m-p/602815#M29300</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-11-08T19:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic Score using other than 0.5 as the cut point.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-Score-using-other-than-0-5-as-the-cut-point/m-p/603297#M29313</link>
      <description>&lt;P&gt;I actually have the ctable and pprob options working and can generate a classification table for any particular pprob.&lt;/P&gt;
&lt;P&gt;I am looking if there is a way to push new data through using the score option on other than 0.5 and pprob does not seem to do that for me.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 18:15:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-Score-using-other-than-0-5-as-the-cut-point/m-p/603297#M29313</guid>
      <dc:creator>slaurett</dc:creator>
      <dc:date>2019-11-11T18:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic Score using other than 0.5 as the cut point.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-Score-using-other-than-0-5-as-the-cut-point/m-p/603301#M29315</link>
      <description>&lt;P&gt;This is interesting.&amp;nbsp; Your statement:&lt;/P&gt;
&lt;P&gt;"...&lt;SPAN&gt;always produces the predicted classification (in the F_&lt;/SPAN&gt;&lt;EM&gt;response&amp;nbsp;&lt;/EM&gt;&lt;SPAN&gt;variable) by selecting the level with the maximum predicted probability."&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Would be the answer.&amp;nbsp; We have only done binary and 0.5 has been the best but if it turned out that 0.7 gave a higher maximum predicted probability score would predict that cut point.&lt;/P&gt;
&lt;P&gt;We have already used the F_ and I_ variable and generated our own predictions using the P_ variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 18:20:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-Score-using-other-than-0-5-as-the-cut-point/m-p/603301#M29315</guid>
      <dc:creator>slaurett</dc:creator>
      <dc:date>2019-11-11T18:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic Score using other than 0.5 as the cut point.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-Score-using-other-than-0-5-as-the-cut-point/m-p/603303#M29316</link>
      <description>&lt;P&gt;Thank you.&amp;nbsp; I had never heard of Proc PLM.&amp;nbsp; &amp;nbsp;I will research and see if I can add this next semester.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 18:22:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-Score-using-other-than-0-5-as-the-cut-point/m-p/603303#M29316</guid>
      <dc:creator>slaurett</dc:creator>
      <dc:date>2019-11-11T18:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic Score using other than 0.5 as the cut point.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-Score-using-other-than-0-5-as-the-cut-point/m-p/603306#M29317</link>
      <description>&lt;P&gt;It has been around since SAS/STAT 9.22, which was released in 2010, so it is almost 10 years old. You can &lt;A href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_plm_toc.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;read the documentation&lt;/A&gt; or Google&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;"proc plm" site:blogs.sas.com/content/iml/&lt;/P&gt;
&lt;P&gt;for more information.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 18:37:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-Score-using-other-than-0-5-as-the-cut-point/m-p/603306#M29317</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-11-11T18:37:44Z</dc:date>
    </item>
  </channel>
</rss>

