BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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;
1 REPLY 1

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 960 views
  • 0 likes
  • 2 in conversation