<?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: Plotting Calibration curve in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Plotting-Calibration-curve/m-p/459964#M116870</link>
    <description>&lt;P&gt;I think Same approach can be followed after you have obtained your predicted values from output of PHREG&lt;/P&gt;</description>
    <pubDate>Fri, 04 May 2018 08:44:11 GMT</pubDate>
    <dc:creator>sammmy</dc:creator>
    <dc:date>2018-05-04T08:44:11Z</dc:date>
    <item>
      <title>Plotting Calibration curve</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Plotting-Calibration-curve/m-p/448472#M112815</link>
      <description>&lt;P&gt;I seriously need help with this. I want to get a calibration plot of Predicted probability on observed event. similar to&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/Plotting-Calibration-curve-line/td-p/82754" target="_blank"&gt;https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/Plotting-Calibration-curve-line/td-p/82754&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But I just seems not to get it. I really need the codes for the deciles too. And mine seems not to work. I am working on a logistic regression for complex survey, my data is about 60, 000 and only 10% have the event of interest.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Mar 2018 02:12:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Plotting-Calibration-curve/m-p/448472#M112815</guid>
      <dc:creator>sammmy</dc:creator>
      <dc:date>2018-03-25T02:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Calibration curve</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Plotting-Calibration-curve/m-p/448473#M112816</link>
      <description>&lt;P&gt;Please post what code you got so far. Let's start from there.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Mar 2018 03:11:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Plotting-Calibration-curve/m-p/448473#M112816</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-03-25T03:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Calibration curve</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Plotting-Calibration-curve/m-p/448477#M112817</link>
      <description>&lt;P&gt;In the Proc rank statement, not sure what variable should be in the "var" line&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import datafile="C:\Users\Downloads\Data variablen.sav"
out=work.usa1
replace;
run;
data live;
set usa1;
WEIGHT=PERWEIGHT/1000000;
run;
**********************Logistic regression model*****************************************************;
PROC surveyLOGISTIC DATA=live ;
strata strata;
cluster PSU;
CLASS  KIDSEX  (REF="Male")KIDBORD(REF="1")AGE5YEAR(REF=("45-49")MARSTAT  (REF="Never married") AGEFIRST(ref="30-49")birth5yrs (ref="More than two")cheb1(ref="&amp;gt; 5")deadkids(ref="Five and above")EDUCLVL(REF="No education")HH5kids(ref="&amp;gt; 5")popage(ref="&amp;gt; 35 years")bednet(ref="No bed net")URBAN (REF="Rural")GEO (REF="NW")/param=glm;
 MODEL KIDALIVE (Event = 'No')=KIDSEX KIDBORD AGE5YEAR MARSTAT AGEFIRST birth5yrs cheb1 deadkids EDUCLVL HH5kids popage bednet URBAN GEO / 
    LINK=LOGIT expb;
output out=pred_ds p=phat;
weight WEIGHT;
RUN;QUIT;
*****************************************end of model*************************************************************;


 **********************************************Obtaining deciles*******************************************;
proc rank data=pred_ds groups=10 descending ties=low out=ranked;
var KIDALIVE;
ranks decile;
run;
**********************************************end**********************************************************;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Mar 2018 05:15:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Plotting-Calibration-curve/m-p/448477#M112817</guid>
      <dc:creator>sammmy</dc:creator>
      <dc:date>2018-03-25T05:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Calibration curve</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Plotting-Calibration-curve/m-p/448478#M112818</link>
      <description>&lt;P&gt;I think you need&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc rank data=pred_ds groups=10 descending ties=low out=ranked;
var phat;
ranks decile;
run;

proc sql;
create table graph as
select 
    *,
    mean(phat) as phatDecile
from ranked
group by decile;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 25 Mar 2018 05:43:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Plotting-Calibration-curve/m-p/448478#M112818</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-03-25T05:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Calibration curve</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Plotting-Calibration-curve/m-p/448492#M112824</link>
      <description>&lt;P&gt;Dear PG thanks for your time, but the codes you gave is not giving me any output. the plot attach is what I hope to get as my result. I will really appreciate your help. thanks&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="estimated prob plot.PNG" style="width: 464px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/19434i8CB4B2A703CDCE37/image-size/large?v=v2&amp;amp;px=999" role="button" title="estimated prob plot.PNG" alt="estimated prob plot.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Mar 2018 11:20:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Plotting-Calibration-curve/m-p/448492#M112824</guid>
      <dc:creator>sammmy</dc:creator>
      <dc:date>2018-03-25T11:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Calibration curve</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Plotting-Calibration-curve/m-p/448527#M112831</link>
      <description>&lt;P&gt;We can't help you unless you show us some of your code and some of your output. The code I gave you should provide you with the x axis coordinates for your graph.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Mar 2018 21:07:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Plotting-Calibration-curve/m-p/448527#M112831</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-03-25T21:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Calibration curve</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Plotting-Calibration-curve/m-p/448533#M112832</link>
      <description>&lt;P&gt;The codes I gave is what I have so far, I hoped to get codes here that will help me obtain my result since I am not too good with SAS. They codes you gave me ran without error but did not produce any output, so I am still stock&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Mar 2018 23:22:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Plotting-Calibration-curve/m-p/448533#M112832</guid>
      <dc:creator>sammmy</dc:creator>
      <dc:date>2018-03-25T23:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Calibration curve</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Plotting-Calibration-curve/m-p/448546#M112839</link>
      <description>&lt;P&gt;If there were no errors, the code should give you a table called &lt;STRONG&gt;graph &lt;/STRONG&gt;with the deciles to draw your plot.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 02:46:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Plotting-Calibration-curve/m-p/448546#M112839</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-03-26T02:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Calibration curve</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Plotting-Calibration-curve/m-p/459168#M116595</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can this approach be modified to suit cox model? I will be glad also to be assisted.&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 02:16:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Plotting-Calibration-curve/m-p/459168#M116595</guid>
      <dc:creator>Joseph2010</dc:creator>
      <dc:date>2018-05-02T02:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Calibration curve</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Plotting-Calibration-curve/m-p/459964#M116870</link>
      <description>&lt;P&gt;I think Same approach can be followed after you have obtained your predicted values from output of PHREG&lt;/P&gt;</description>
      <pubDate>Fri, 04 May 2018 08:44:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Plotting-Calibration-curve/m-p/459964#M116870</guid>
      <dc:creator>sammmy</dc:creator>
      <dc:date>2018-05-04T08:44:11Z</dc:date>
    </item>
  </channel>
</rss>

