The SAS Output Delivery System and reporting techniques

ODS and PROC LIFETEST

Reply
N/A
Posts: 0

ODS and PROC LIFETEST

Hi,

I'm generating Kaplan-Meier curves using PROC LIFETEST, with the following code, but have a few questions.

1) How do I avoid getting a log-rank p-value outputted onto the RTF?
2) When I don't use ODS, and instead get a graph in SAS, the color scheme and lines I have specified are adhered to, but in ODS, a completely random set of colors/line patterns is used - why is this and how do I change it?
3) Is it possible to remove the legend?

Thanks so much! Code below.

ods graphics on;
ods rtf file = "\pathway\filename.rtf";
ods noptitle;
ods select survival;
proc lifetest data=agegrp plots=(s) width=1 graphics;
time year*failure(1,2);
strata agegrp;
symbol1 v=none color=red line=1;
symbol2 v=none color=blue line=1;
symbol3 v=none color=green line=1;
symbol4 v=none color=orange line=1;
symbol5 v=none color=red line=2;
symbol6 v=none color=blue line=2;
symbol7 v=none color=green line=2;
symbol8 v=none color=orange line=2;
label year='Year';
title1 "Kaplan-Meier Estimates of Survival Function, By Age Group";
run;
ods rtf close;
ods graphics off;
SAS Super FREQ
Posts: 8,742

Re: ODS and PROC LIFETEST

Ask a Question
Discussion stats
  • 1 reply
  • 172 views
  • 0 likes
  • 2 in conversation