<?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: Calibration Curve / Stats + PPV / NPV in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Calibration-Curve-Stats-PPV-NPV/m-p/858001#M37881</link>
    <description>&lt;A href="https://blogs.sas.com/content/iml/2018/05/14/calibration-plots-in-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2018/05/14/calibration-plots-in-sas.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2018/05/16/decile-calibration-plots-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2018/05/16/decile-calibration-plots-sas.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2019/02/20/easier-calibration-plot-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2019/02/20/easier-calibration-plot-sas.html&lt;/A&gt;</description>
    <pubDate>Thu, 09 Feb 2023 12:16:43 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2023-02-09T12:16:43Z</dc:date>
    <item>
      <title>Calibration Curve / Stats + PPV / NPV</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Calibration-Curve-Stats-PPV-NPV/m-p/857049#M37813</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope you're well - was wondering if there's a simple way to get calibration curve + metrics + PPV /NPV for my logistic regression model (code + pic below) ? Hopefully a simple addition of code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best wishes,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC LOGISTIC DATA = ARCAGE;&lt;BR /&gt;FORMAT SMOK SMOK. DRINK DRINK. SEX SEX. PROLEV PROLEV. ALCOIC ALCOIC. TEETH TEETH. ;&lt;BR /&gt;CLASS SMOK ( REF = 'Never smoker')&lt;BR /&gt;DRINK (REF = '0: Never')&lt;BR /&gt;SEX ( REF = '2: Female' )&lt;BR /&gt;PROLEV (REF = '3: University degree/Manager')&lt;BR /&gt;ALCOIC (REF = '3: 3-4')&lt;BR /&gt;TEETH ( REF = '0: Never');&lt;BR /&gt;&lt;BR /&gt;model CASE = AGE10 SEX PROLEV&lt;BR /&gt;SMOK SMOKP&lt;BR /&gt;DRINK ALCOIC&lt;BR /&gt;TEETH&lt;BR /&gt;/rocci RL SELECTION = F;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CraigSmith_0-1675432948061.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80083iA4188CAE9C9373F9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CraigSmith_0-1675432948061.png" alt="CraigSmith_0-1675432948061.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 14:04:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Calibration-Curve-Stats-PPV-NPV/m-p/857049#M37813</guid>
      <dc:creator>CraigSmith</dc:creator>
      <dc:date>2023-02-03T14:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Calibration Curve / Stats + PPV / NPV</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Calibration-Curve-Stats-PPV-NPV/m-p/857082#M37814</link>
      <description>&lt;P&gt;For calibration plots, see:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2019/02/20/easier-calibration-plot-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2019/02/20/easier-calibration-plot-sas.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wouldn't think you could get PPV/NPV from proc logistic, because you would need a way to tell it a cutpoint for deciding if the test/prediction is positive or negative (based on the predicted probability).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I would think you could output the predicted probabilities from the model, then use a data step&amp;nbsp; to use whatever probability cutpoint you want to calculate postive/negative.&amp;nbsp; Then you could use PROC FREQ to get Sens/Spec/PPV/NPV.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 17:05:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Calibration-Curve-Stats-PPV-NPV/m-p/857082#M37814</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-02-03T17:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calibration Curve / Stats + PPV / NPV</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Calibration-Curve-Stats-PPV-NPV/m-p/857728#M37834</link>
      <description>&lt;P&gt;Thanks Quentin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry had some tech issues. Shall give this a crack and report back.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;KR,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Craig&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 11:56:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Calibration-Curve-Stats-PPV-NPV/m-p/857728#M37834</guid>
      <dc:creator>CraigSmith</dc:creator>
      <dc:date>2023-02-08T11:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Calibration Curve / Stats + PPV / NPV</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Calibration-Curve-Stats-PPV-NPV/m-p/857979#M37872</link>
      <description>&lt;P&gt;Hi Quentin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your answers - hope you're well. Have tried the calibration code but unsure how to make it work to my model - do you know what I'm doing wrong.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best wishes,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Craig&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* NEW in SAS/STAT 15.1 (SAS 9.4M6): PLOTS=CALIBRATION option in PROC LOGISTIC */&lt;BR /&gt;title "Calibration Plot for a Quadratic Model";&lt;BR /&gt;title2 "Created by PROC LOGISTIC";&lt;BR /&gt;proc logistic data=LogiSim plots=calibration(CLM ShowObs);&lt;BR /&gt;model y(Event='1') = x x*x / GOF; /* New in 15.1: More goodness-of-fit statistics */&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;PROC LOGISTIC DATA = ARCAGE;&lt;BR /&gt;plots=calibration(CLM ShowObs);&lt;BR /&gt;model y(Event='1') = x x*x / GOF; /* New in 15.1: More goodness-of-fit statistics */&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CraigSmith_0-1675938607946.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80267i93602897752EBD71/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CraigSmith_0-1675938607946.png" alt="CraigSmith_0-1675938607946.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 10:32:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Calibration-Curve-Stats-PPV-NPV/m-p/857979#M37872</guid>
      <dc:creator>CraigSmith</dc:creator>
      <dc:date>2023-02-09T10:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calibration Curve / Stats + PPV / NPV</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Calibration-Curve-Stats-PPV-NPV/m-p/857999#M37880</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not familiar with calibration curves.&amp;nbsp; But can you describe what is going wrong with your attempt?&amp;nbsp; Are you getting errors in the log?&amp;nbsp; (Please post log)&amp;nbsp; Or are you getting unexpected results?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Q.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 11:54:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Calibration-Curve-Stats-PPV-NPV/m-p/857999#M37880</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-02-09T11:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: Calibration Curve / Stats + PPV / NPV</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Calibration-Curve-Stats-PPV-NPV/m-p/858001#M37881</link>
      <description>&lt;A href="https://blogs.sas.com/content/iml/2018/05/14/calibration-plots-in-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2018/05/14/calibration-plots-in-sas.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2018/05/16/decile-calibration-plots-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2018/05/16/decile-calibration-plots-sas.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2019/02/20/easier-calibration-plot-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2019/02/20/easier-calibration-plot-sas.html&lt;/A&gt;</description>
      <pubDate>Thu, 09 Feb 2023 12:16:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Calibration-Curve-Stats-PPV-NPV/m-p/858001#M37881</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-02-09T12:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Calibration Curve / Stats + PPV / NPV</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Calibration-Curve-Stats-PPV-NPV/m-p/858328#M37902</link>
      <description>&lt;P&gt;Hi Quentin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tried adapting code from&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2019/02/20/easier-calibration-plot-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2019/02/20/easier-calibration-plot-sas.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;to my data / logistic model&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* NEW in SAS/STAT 15.1 (SAS 9.4M6): PLOTS=CALIBRATION option in PROC LOGISTIC */&lt;BR /&gt;title "Calibration Plot for a Quadratic Model";&lt;BR /&gt;title2 "Created by PROC LOGISTIC";&lt;BR /&gt;proc logistic data=ARCAGE plots=calibration(CLM ShowObs);&lt;BR /&gt;model y(Event='1') = x x*x / GOF; /* New in 15.1: More goodness-of-fit statistics */&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gave log error of&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3547 /* NEW in SAS/STAT 15.1 (SAS 9.4M6): PLOTS=CALIBRATION&lt;BR /&gt;3547! option in PROC LOGISTIC */&lt;BR /&gt;3548 title "Calibration Plot for a Quadratic Model";&lt;BR /&gt;3549 title2 "Created by PROC LOGISTIC";&lt;BR /&gt;NOTE: PROCEDURE LOGISTIC used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;ERROR: Variable Y not found.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of&lt;BR /&gt;errors.&lt;BR /&gt;3550 proc logistic data=ARCAGE plots=calibration(CLM ShowObs);&lt;BR /&gt;3551 model y(Event='1') = x x*x / GOF; /* New in 15.1:&lt;BR /&gt;3551! More goodness-of-fit statistics */&lt;BR /&gt;3552 run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm essentially unsure how to adapt the code from that to mine (zero coding background) thought DATA = ARCAGE would fix it but apparently not.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 19:19:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Calibration-Curve-Stats-PPV-NPV/m-p/858328#M37902</guid>
      <dc:creator>CraigSmith</dc:creator>
      <dc:date>2023-02-10T19:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calibration Curve / Stats + PPV / NPV</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Calibration-Curve-Stats-PPV-NPV/m-p/858329#M37903</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is a SAS programmer nearby, you might want to ask them for help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that your original model statement referred to variables that exist in your dataset ARCAGE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The new model statement you tried is:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;model y(Event='1') = x x*x / GOF;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;But your dataset ARCAGE does not have variables named Y or X.&amp;nbsp; &amp;nbsp; That causes the key ERROR message in the log:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;ERROR: Variable Y not found.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You could try changing back to your original model statement, or a simpler version of that model statement.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 19:39:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Calibration-Curve-Stats-PPV-NPV/m-p/858329#M37903</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-02-10T19:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: Calibration Curve / Stats + PPV / NPV</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Calibration-Curve-Stats-PPV-NPV/m-p/858338#M37904</link>
      <description>&lt;P&gt;Thanks Quentin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hmmm I'm without any stats support in my department till the 20th.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Was hoping calibration curve would be relatively straightforward to do myself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Shall keep code form forums and see if they can modify it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BW,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Craig&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 20:23:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Calibration-Curve-Stats-PPV-NPV/m-p/858338#M37904</guid>
      <dc:creator>CraigSmith</dc:creator>
      <dc:date>2023-02-10T20:23:06Z</dc:date>
    </item>
  </channel>
</rss>

