<?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 Capturing 95% CI Limits (so CI bands can be plotted) from PROC LIFETEST in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Capturing-95-CI-Limits-so-CI-bands-can-be-plotted-from-PROC/m-p/905034#M357485</link>
    <description>&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using PROC LIFETEST to calculate values for a KM plot, and then using&amp;nbsp; PROC SGPLOT to plot the curves.&amp;nbsp; Is there a way to use PDS OUTPUT to capture the CI band values that are shown in this plot that is output directly from LIFETEST?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code (as you can see, I've been trying to see what output dataset they might be routed to):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;ods output CensoredSummary = cs
           Means           = mean
		   quartiles       = quart;

ods trace on;

proc lifetest data = acmort0 alphaqt = 0.05 plots = survival (cb atrisk = 0 to 30 by 3);
     time aval * cnsr(1);
     strata cvhgrpn / notest;
     run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here is the plot created by LIFETEST, which includes the confidence bands:&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="davehalltwp_0-1701207111936.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/90404i844F1D9E11947C4E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="davehalltwp_0-1701207111936.png" alt="davehalltwp_0-1701207111936.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to capture the band values so I can plot them myself via SGPLOT?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I realize that it's possible to customize the plot created by PROC LIFETEST (a "Warren Kuhfeld special"), but the program I inherited doesn't do it that way and I don't want to disturb it at this point in our project timeline.&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>Tue, 28 Nov 2023 21:35:46 GMT</pubDate>
    <dc:creator>davehalltwp</dc:creator>
    <dc:date>2023-11-28T21:35:46Z</dc:date>
    <item>
      <title>Capturing 95% CI Limits (so CI bands can be plotted) from PROC LIFETEST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Capturing-95-CI-Limits-so-CI-bands-can-be-plotted-from-PROC/m-p/905034#M357485</link>
      <description>&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using PROC LIFETEST to calculate values for a KM plot, and then using&amp;nbsp; PROC SGPLOT to plot the curves.&amp;nbsp; Is there a way to use PDS OUTPUT to capture the CI band values that are shown in this plot that is output directly from LIFETEST?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code (as you can see, I've been trying to see what output dataset they might be routed to):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;ods output CensoredSummary = cs
           Means           = mean
		   quartiles       = quart;

ods trace on;

proc lifetest data = acmort0 alphaqt = 0.05 plots = survival (cb atrisk = 0 to 30 by 3);
     time aval * cnsr(1);
     strata cvhgrpn / notest;
     run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here is the plot created by LIFETEST, which includes the confidence bands:&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="davehalltwp_0-1701207111936.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/90404i844F1D9E11947C4E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="davehalltwp_0-1701207111936.png" alt="davehalltwp_0-1701207111936.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to capture the band values so I can plot them myself via SGPLOT?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I realize that it's possible to customize the plot created by PROC LIFETEST (a "Warren Kuhfeld special"), but the program I inherited doesn't do it that way and I don't want to disturb it at this point in our project timeline.&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>Tue, 28 Nov 2023 21:35:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Capturing-95-CI-Limits-so-CI-bands-can-be-plotted-from-PROC/m-p/905034#M357485</guid>
      <dc:creator>davehalltwp</dc:creator>
      <dc:date>2023-11-28T21:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: Capturing 95% CI Limits (so CI bands can be plotted) from PROC LIFETEST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Capturing-95-CI-Limits-so-CI-bands-can-be-plotted-from-PROC/m-p/905049#M357488</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See the WORK.ABC (outsurv=) dataset! ABC has columns for the confidence band.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics on;
proc lifetest data=VALung plots=(s,ls,lls) outtest=Test maxtime=600
              outsurv=ABC CONFBAND=ALL /*CONFTYPE=LOGLOG*/;
   time SurvTime*Censor(1);
   id Therapy;
   strata Cell;
   test Age Prior DiagTime Kps Treatment;
run;
ods graphics off;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 22:52:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Capturing-95-CI-Limits-so-CI-bands-can-be-plotted-from-PROC/m-p/905049#M357488</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2023-11-28T22:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: Capturing 95% CI Limits (so CI bands can be plotted) from PROC LIFETEST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Capturing-95-CI-Limits-so-CI-bands-can-be-plotted-from-PROC/m-p/905051#M357489</link>
      <description>&lt;P&gt;What did the ODS trace output show in the log?&lt;/P&gt;
&lt;P&gt;The plot object(s) item should be shown. ODS &amp;lt;nameofitem&amp;gt;=yourdatasetname; referencing the plot item should capture the data if CI was included in the plot. I haven't worked with lifetest but a few other procs us PLOTS as the Ods object.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is however likely to be some manipulation of the resulting data to get it into the form that Sgplot or Sgpanel would like as there can be different types of values associated with the same x,y coordinate and you will need to reshape the data a bit.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 22:56:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Capturing-95-CI-Limits-so-CI-bands-can-be-plotted-from-PROC/m-p/905051#M357489</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-11-28T22:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Capturing 95% CI Limits (so CI bands can be plotted) from PROC LIFETEST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Capturing-95-CI-Limits-so-CI-bands-can-be-plotted-from-PROC/m-p/905052#M357490</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/175401"&gt;@davehalltwp&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For what&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;is suggesting, you can see an example of that approach here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Statistical-Procedures/Proc-Gam/m-p/904749#M44902" target="_blank"&gt;https://communities.sas.com/t5/Statistical-Procedures/Proc-Gam/m-p/904749#M44902&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 22:59:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Capturing-95-CI-Limits-so-CI-bands-can-be-plotted-from-PROC/m-p/905052#M357490</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2023-11-28T22:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: Capturing 95% CI Limits (so CI bands can be plotted) from PROC LIFETEST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Capturing-95-CI-Limits-so-CI-bands-can-be-plotted-from-PROC/m-p/905070#M357496</link>
      <description>&lt;P&gt;You want this ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
   value grpLabel 1='ALL' 2='AML low risk' 3='AML high risk';
run;

data BMT;
        input DIAGNOSIS Ftime Status Gender@@;
        label Ftime="Days";
        format Diagnosis grpLabel.;
datalines;
1       2081       0       1       1       1602    0       1
1       1496       0       1       1       1462    0       0
1       1433       0       1       1       1377    0       1
1       1330       0       1       1       996     0       1
1       226        0       0       1       1199    0       1
1       1111       0       1       1       530     0       1
1       1182       0       0       1       1167    0       0
1       418        2       1       1       383     1       1
1       276        2       0       1       104     1       1
1       609        1       1       1       172     2       0
1       487        2       1       1       662     1       1
1       194        2       0       1       230     1       0
1       526        2       1       1       122     2       1
1       129        1       0       1       74      1       1
1       122        1       0       1       86      2       1
1       466        2       1       1       192     1       1
1       109        1       1       1       55      1       0
1       1          2       1       1       107     2       1
1       110        1       0       1       332     2       1
2       2569       0       1       2       2506    0       1
2       2409       0       1       2       2218    0       1
2       1857       0       0       2       1829    0       1
2       1562       0       1       2       1470    0       1
2       1363       0       1       2       1030    0       0
2       860        0       0       2       1258    0       0
2       2246       0       0       2       1870    0       0
2       1799       0       1       2       1709    0       0
2       1674       0       1       2       1568    0       1
2       1527       0       0       2       1324    0       1
2       957        0       1       2       932     0       0
2       847        0       1       2       848     0       1
2       1850       0       0       2       1843    0       0
2       1535       0       0       2       1447    0       0
2       1384       0       0       2       414     2       1
2       2204       2       0       2       1063    2       1
2       481        2       1       2       105     2       1
2       641        2       1       2       390     2       1
2       288        2       1       2       421     1       1
2       79         2       0       2       748     1       1
2       486        1       0       2       48      2       0
2       272        1       0       2       1074    2       1
2       381        1       0       2       10      2       1
2       53         2       0       2       80      2       0
2       35         2       0       2       248     1       1
2       704        2       0       2       211     1       1
2       219        1       1       2       606     1       1
3       2640       0       1       3       2430    0       1
3       2252       0       1       3       2140    0       1
3       2133       0       0       3       1238    0       1
3       1631       0       1       3       2024    0       0
3       1345       0       1       3       1136    0       1
3       845        0       0       3       422     1       0
3       162        2       1       3       84      1       0
3       100        1       1       3       2       2       1
3       47         1       1       3       242     1       1
3       456        1       1       3       268     1       0
3       318        2       0       3       32      1       1
3       467        1       0       3       47      1       1
3       390        1       1       3       183     2       0
3       105        2       1       3       115     1       0
3       164        2       0       3       93      1       0
3       120        1       0       3       80      2       1
3       677        2       1       3       64      1       0
3       168        2       0       3       74      2       0
3       16         2       0       3       157     1       0
3       625        1       0       3       48      1       0
3       273        1       1       3       63      2       1
3       76         1       1       3       113     1       0
3       363        2       1
;
run;

proc sort data=bmt;by diagnosis;run;

ods select none;
ods output SurvivalPlot=SurvivalPlot;
proc lifetest data=bmt plots=survival(cb atrisk=0 to 2500 by 500);
time ftime*Status(0);
strata diagnosis;
run;
ods select all;



title '缓解概率';
proc sgplot data=SurvivalPlot;
band x=Time lower=HW_LCL upper=HW_UCL/ group=Stratum transparency=0.8 modelname='x';
step x=Time y=Survival / group=Stratum lineattrs=(pattern=solid)  name='x' ;
scatter x=Time y=Censored / group=Stratum markerattrs=(symbol=plus) ;
xaxistable atrisk / x=tatrisk class=stratum colorgroup=stratum valueattrs=(weight=bold) location=inside;
inset '+ Censored' /position=ne border;
keylegend 'x';
run;


&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1701227747453.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/90410i9389F8B23496728A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1701227747453.png" alt="Ksharp_0-1701227747453.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 03:15:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Capturing-95-CI-Limits-so-CI-bands-can-be-plotted-from-PROC/m-p/905070#M357496</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-11-29T03:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: Capturing 95% CI Limits (so CI bands can be plotted) from PROC LIFETEST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Capturing-95-CI-Limits-so-CI-bands-can-be-plotted-from-PROC/m-p/905183#M357532</link>
      <description>&lt;P&gt;Thanks everybody.&amp;nbsp; I learned stuff from every response!&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 15:39:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Capturing-95-CI-Limits-so-CI-bands-can-be-plotted-from-PROC/m-p/905183#M357532</guid>
      <dc:creator>davehalltwp</dc:creator>
      <dc:date>2023-11-29T15:39:21Z</dc:date>
    </item>
  </channel>
</rss>

