BookmarkSubscribeRSS Feed
KentaMURANAKA
Pyrite | Level 9

Hello, All:

 

I am trying to create Kaplan-Meier Failure Plot with proc LIFETEST.

I have 2 questions about this.

 

No.1

Sample code is below.

data bmt;
    set sashelp.bmt(where=(group eq "AML-Low Risk"));
run;

options nonumber nodate papersize="A4" orientation=landscape;

ods rtf style=journal;
ods graphics / noborder;
ods select failureplot;
ods noproctitle;
proc lifetest data=bmt plots=(survival(failure atrisk(maxlen=13)));
    time t*status(0);
    strata group;
    title " ";
run;
ods rtf close;

About the output, I would like to delete 3 default titles, "The SAS System", "The LIFETEST Procedure", and "Stratum 1: Disease Group = AML-Low Risk".

As you see my code, I used TITLE statement & ODS NOPROCTITLE, and deleted two, "The SAS System", "The LIFETEST Procedure", but the last one, "Stratum 1:~" is not.

Do you have any ideas to delete the last one?

 

No.2

I would like to customize default label, "At Risk", which expresses the label of # of subjects at risk.

 

In order to solve these problems, I refered some papers (Kuhfeld WF, et al. -2014-, Geaty H -2015-, etc.) and tried to customize the template, "Stat.Lifetest.Graphics.ProductLimitFailure", but I have no ideas where should be changed.

 

Thank you in advance.

4 REPLIES 4
KentaMURANAKA
Pyrite | Level 9

About No.1 question, I deleted STRATA statement and solved. Sorry!!

 

I want your answers about No.2 question.

Reeza
Super User
Unfortunately I think you’re stuck modifying the templates for failure plots.

https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=statug&docsetTarget=statu...

You can try the macros here as starters to figure out what to change. Or you could rebuild the plots from scratch and customize as desired.
https://blogs.sas.com/content/graphicallyspeaking/2018/02/19/survival-plot-twist-using-sgplot-proced...
KentaMURANAKA
Pyrite | Level 9

Thank you, Reeza.

 

I added following code to template "Stat.Lifetest.Graphics.ProductLimitFailure", and I think solved.

DRAWRECTANGLE statement & DRAWTEXT statement

(I do not change original label "At Risk", just overlapped rectangle and comment box lol)

 

I have no ideas where to be customized template or ATRISK option in proc LIFETEST.

 

Anyway, thank you!

Reeza
Super User
Remember to undo the changes to your template for your next run!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 2333 views
  • 2 likes
  • 2 in conversation