BookmarkSubscribeRSS Feed
Calcite | Level 5



I want to show the difference in cumulative incidence of tumor recurrence between two groups (strata "variable" in the code below), treating death as a competing event. I am having trouble displaying censoring marks on cumulative incidence function plots when using competing risks analysis. I am also having trouble displaying the number of patients at risk at each time point (but I realize that the OUTCIF function can compute a table with number at risk at each time point which can then be manually entered underneath the CIF plot). I have no trouble showing censoring marks using the cumulative incidence capabilities of the Kaplan-Meier analysis; however, Kaplan-Meier overestimates cumulative incidence because it censors death instead of treating it as a competing event. I would therefore prefer not to use Kaplan-Meier. Below is the code for CIF and for the Kaplan-Meier method, respectively. Any help to display censoring marks for CIF in SAS 9.4 would be greatly appreciated.


proc lifetest data=filename 

time Months*censor(0) / eventcode=1;
strata variable;


proc lifetest data=filename
plots=(survival(outside f ATRISK PVALUE));

strata variable;
time Months*censor(0);



Rhodochrosite | Level 12

If no one responds, you should probably ask technical support.  We have many options for customizing the survival plot.  We have an entire chapter devoted to it  We don't provide that type of customization for any other graph.  You have unlimited ways to customize if you can make a data set with the right form.  Sometimes this involves running the procedure multiple times or running multiple procedures and then combining ODS output data set or other output data sets.  Then you can customize the template.  The default template for the CIF plot does not contain the axis table needed to display the number of subjects at risk. I don't know enough about the CIF plot to help you with this.

Calcite | Level 5

Did you ever get any help on how to do this?  I'm trying to accomplish the same thing.  I would like to add the tick marks for censored to CI curve from Lifetest and also add the number at risk table to the same graph.  Basically just like for the survival curves except for the CI curve.



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg



Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 2 replies
  • 3 in conversation