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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 845 views
  • 0 likes
  • 2 in conversation