<?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 How do I get the 95% Confidence Limits for multiple data points  in proc lifetest? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-the-95-Confidence-Limits-for-multiple-data-points/m-p/502704#M705</link>
    <description>&lt;P&gt;&amp;nbsp;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to get 95% confidence limits for 5, 10, and 15 year individually on my&amp;nbsp;on my KM survival curve. I know how to get the bands on my plot using&amp;nbsp; &lt;FONT color="#0000ff"&gt;&lt;STRONG&gt;plots&lt;/STRONG&gt;&lt;/FONT&gt;=(survival(&lt;STRONG&gt;&lt;FONT color="#0000ff"&gt;cb&lt;/FONT&gt;&lt;/STRONG&gt;=&lt;STRONG&gt;&lt;FONT color="#0000ff"&gt;hw&lt;/FONT&gt;&lt;/STRONG&gt;)), but how do I get the specific confidence limit for each of my 3 data points? All I get with my current code are the quartile estimates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using Proc LifeTest and here is my code by the&amp;nbsp; way. What I don't know is if I'm supposed use an ODS statement, or if there is a step within proc-lifetest&amp;nbsp; to calculate the 95% CIs. and WHERE in my code is this step supposed to go? (fairly new to SAS)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code is below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname Hetal "\\tuftsmc\home\hpatel3\SAS Datasets";
run; 

proc import out=hetal.ES_database datafile="\\tuftsmc\home\hpatel3\SAS Datasets\ES Database Edit.csv" dbms=csv replace;  getnames=yes; datarow=2; 
run;
ods graphics on / attrpriority=color; 
Ods output survivalplot=survplot;
proc lifetest data=hetal.es_database conftype=loglog plot=(s) plots=(survival(cb=hw))
timelist=(5 10) outs=survival_rates reduceout; 
time FU_Total*Status(0);
Title"5 &amp;amp; 10 Year Survival Estimate for ES";
run;

proc sgplot data=survplot noborder nowall;
step x=Time y=Survival / lineattrs=(color=darkblue thickness=2);
xaxis display=(noticks) label="Years" values=(0 to 10 by 2) min=0 max=10 labelattrs=(size=10 weight=bold );
yaxis label='Survival Probability' values=(0 to 1.0 by 0.2) min=0 max=1.0 labelattrs=(size=10 weight=bold);
inset / title="95% CI:10.4476 (5.770, 16.2245) " position=bottomright;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Oct 2018 14:16:22 GMT</pubDate>
    <dc:creator>hpatel3</dc:creator>
    <dc:date>2018-10-09T14:16:22Z</dc:date>
    <item>
      <title>How do I get the 95% Confidence Limits for multiple data points  in proc lifetest?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-the-95-Confidence-Limits-for-multiple-data-points/m-p/502704#M705</link>
      <description>&lt;P&gt;&amp;nbsp;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to get 95% confidence limits for 5, 10, and 15 year individually on my&amp;nbsp;on my KM survival curve. I know how to get the bands on my plot using&amp;nbsp; &lt;FONT color="#0000ff"&gt;&lt;STRONG&gt;plots&lt;/STRONG&gt;&lt;/FONT&gt;=(survival(&lt;STRONG&gt;&lt;FONT color="#0000ff"&gt;cb&lt;/FONT&gt;&lt;/STRONG&gt;=&lt;STRONG&gt;&lt;FONT color="#0000ff"&gt;hw&lt;/FONT&gt;&lt;/STRONG&gt;)), but how do I get the specific confidence limit for each of my 3 data points? All I get with my current code are the quartile estimates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using Proc LifeTest and here is my code by the&amp;nbsp; way. What I don't know is if I'm supposed use an ODS statement, or if there is a step within proc-lifetest&amp;nbsp; to calculate the 95% CIs. and WHERE in my code is this step supposed to go? (fairly new to SAS)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code is below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname Hetal "\\tuftsmc\home\hpatel3\SAS Datasets";
run; 

proc import out=hetal.ES_database datafile="\\tuftsmc\home\hpatel3\SAS Datasets\ES Database Edit.csv" dbms=csv replace;  getnames=yes; datarow=2; 
run;
ods graphics on / attrpriority=color; 
Ods output survivalplot=survplot;
proc lifetest data=hetal.es_database conftype=loglog plot=(s) plots=(survival(cb=hw))
timelist=(5 10) outs=survival_rates reduceout; 
time FU_Total*Status(0);
Title"5 &amp;amp; 10 Year Survival Estimate for ES";
run;

proc sgplot data=survplot noborder nowall;
step x=Time y=Survival / lineattrs=(color=darkblue thickness=2);
xaxis display=(noticks) label="Years" values=(0 to 10 by 2) min=0 max=10 labelattrs=(size=10 weight=bold );
yaxis label='Survival Probability' values=(0 to 1.0 by 0.2) min=0 max=1.0 labelattrs=(size=10 weight=bold);
inset / title="95% CI:10.4476 (5.770, 16.2245) " position=bottomright;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 14:16:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-the-95-Confidence-Limits-for-multiple-data-points/m-p/502704#M705</guid>
      <dc:creator>hpatel3</dc:creator>
      <dc:date>2018-10-09T14:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the 95% Confidence Limits for multiple data points  in proc lifetest?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-the-95-Confidence-Limits-for-multiple-data-points/m-p/502757#M708</link>
      <description>&lt;P&gt;Did you check all your output data sets?&lt;/P&gt;
&lt;P&gt;Particularly, survival_rates?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/237382"&gt;@hpatel3&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to get 95% confidence limits for 5, 10, and 15 year individually on my&amp;nbsp;on my KM survival curve. I know how to get the bands on my plot using&amp;nbsp; &lt;FONT color="#0000ff"&gt;&lt;STRONG&gt;plots&lt;/STRONG&gt;&lt;/FONT&gt;=(survival(&lt;STRONG&gt;&lt;FONT color="#0000ff"&gt;cb&lt;/FONT&gt;&lt;/STRONG&gt;=&lt;STRONG&gt;&lt;FONT color="#0000ff"&gt;hw&lt;/FONT&gt;&lt;/STRONG&gt;)), but how do I get the specific confidence limit for each of my 3 data points? All I get with my current code are the quartile estimates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using Proc LifeTest and here is my code by the&amp;nbsp; way. What I don't know is if I'm supposed use an ODS statement, or if there is a step within proc-lifetest&amp;nbsp; to calculate the 95% CIs. and WHERE in my code is this step supposed to go? (fairly new to SAS)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My code is below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname Hetal "\\tuftsmc\home\hpatel3\SAS Datasets";
run; 

proc import out=hetal.ES_database datafile="\\tuftsmc\home\hpatel3\SAS Datasets\ES Database Edit.csv" dbms=csv replace;  getnames=yes; datarow=2; 
run;
ods graphics on / attrpriority=color; 
Ods output survivalplot=survplot;
proc lifetest data=hetal.es_database conftype=loglog plot=(s) plots=(survival(cb=hw))
timelist=(5 10) outs=survival_rates reduceout; 
time FU_Total*Status(0);
Title"5 &amp;amp; 10 Year Survival Estimate for ES";
run;

proc sgplot data=survplot noborder nowall;
step x=Time y=Survival / lineattrs=(color=darkblue thickness=2);
xaxis display=(noticks) label="Years" values=(0 to 10 by 2) min=0 max=10 labelattrs=(size=10 weight=bold );
yaxis label='Survival Probability' values=(0 to 1.0 by 0.2) min=0 max=1.0 labelattrs=(size=10 weight=bold);
inset / title="95% CI:10.4476 (5.770, 16.2245) " position=bottomright;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 15:32:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-the-95-Confidence-Limits-for-multiple-data-points/m-p/502757#M708</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-09T15:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the 95% Confidence Limits for multiple data points  in proc lifetest?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-the-95-Confidence-Limits-for-multiple-data-points/m-p/503052#M760</link>
      <description>&lt;P&gt;yes! I have the survival rates and quartile estimates, but not the confidence limits.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2018 12:32:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-the-95-Confidence-Limits-for-multiple-data-points/m-p/503052#M760</guid>
      <dc:creator>hpatel3</dc:creator>
      <dc:date>2018-10-10T12:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the 95% Confidence Limits for multiple data points  in proc lifetest?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-the-95-Confidence-Limits-for-multiple-data-points/m-p/503114#M776</link>
      <description>&lt;P&gt;Hmm...please post a proc contents on the &lt;FONT color="#800080"&gt;&lt;STRONG&gt;survival_rates&lt;/STRONG&gt;&lt;/FONT&gt; data set.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that your next step uses the survplot data set not the survival_rates data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents data=survival_rates;run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;From the documentation the OUTSURV/OUTS data sets include the following, which is what I get in my test. What happens if you run the code below? Does that generate the confidence intervals?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title 'Survival of Males with Angina Pectoris';
data Males;
   keep Freq Years Censored;
   retain Years -.5;
   input fail withdraw @@;
   Years + 1;
   Censored=0;
   Freq=fail;
   output;
   Censored=1;
   Freq=withdraw;
   output;
   datalines;
456   0 226  39 152  22 171  23 135 24 125 107
 83 133  74 102  51  68  42  64  43 45  34  53
 18  33   9  27   6  23   0  30
;

ods graphics on;
proc lifetest data=Males 
              plots=(s,ls,lls,h,p) outs=survival_Rates timelist = (0 to 15 by 3) reduceout;
   time Years*Censored(1) ;
   freq Freq;
   
run;
ods graphics off;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;H4 class="xis-title"&gt;OUTSURV= Data Set&lt;/H4&gt;
&lt;/DIV&gt;
&lt;P&gt;You can specify the OUTSURV= option in the PROC LIFETEST statement to create an output data set that contains the survival estimates. The data set contains the following columns:&lt;/P&gt;
&lt;DIV&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;P&gt;any specified BY variables&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;a numeric variable&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="aa-varname"&gt;STRATUM&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;that numbers the strata, if you specify the STRATA statement&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;any specified STRATA variables, their values coming from either their original values or the midpoints of the stratum intervals if endpoints are used to define strata (semi-infinite intervals are labeled by their finite endpoint)&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;the GROUP= variables, if you specify the GROUP= option in the STRATA statement&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;the time variable as specified in the TIME statement. For METHOD=KM, METHOD=BRESLOW, or METHOD=FH, it contains the observed failure or censored times. For the life-table estimates, it contains the lower endpoints of the time intervals.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;CODE class="aa-varname"&gt;SURVIVAL&lt;/CODE&gt;, a variable that contains the survivor function estimates&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;CODE class="aa-varname"&gt;CONFTYPE&lt;/CODE&gt;, a variable that contains the name of the transformation applied to the survival time in the computation of confidence intervals&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;FONT size="4" color="#800080"&gt;&lt;STRONG&gt;&lt;CODE class="aa-varname"&gt;SDF_LCL&lt;/CODE&gt;, a variable that contains the lower limits of the pointwise confidence intervals for the survivor function&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;FONT size="4" color="#800080"&gt;&lt;STRONG&gt;&lt;CODE class="aa-varname"&gt;SDF_UCL&lt;/CODE&gt;, a variable that contains the upper limits of the pointwise confidence intervals for the survivor function&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/237382"&gt;@hpatel3&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;yes! I have the survival rates and quartile estimates, but not the confidence limits.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 10 Oct 2018 14:58:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-the-95-Confidence-Limits-for-multiple-data-points/m-p/503114#M776</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-10T14:58:16Z</dc:date>
    </item>
  </channel>
</rss>

