Programming the statistical procedures from SAS

How do I draw 2 CIF curves for both interest of event and competing event

Reply
Contributor
Posts: 24

How do I draw 2 CIF curves for both interest of event and competing event

Hello,

 

I use SAS 9.4 and I am practicing drawing cumulative incidence function curve and I used the following dataset:

id    time    event

1    9          2
2    27        0
3    18        0
4    30        1
5    10        1
6    33        2
7    13        1
8    19        2
9    24        2
10   4         1

where 0 indicates censoring, 1 indicates event, and 2 indicates competing event. I used the following codes:

ods graphics on;
  proc lifetest data=survival plots=cif;
  time time*event(0) / eventcode=1;

  title "CIF for event";
run;

 

In the output, I only get the curve for the interest of event. But I want to get the 2 curves for both interest of event (), and competing event in 1 graph. Does anyone know how to edit the codes to get 2 curves? Also I am wondering how to make the title listed just above the graph instead of at the top of the whole output. Thank you in advance!

Ask a Question
Discussion stats
  • 0 replies
  • 190 views
  • 0 likes
  • 1 in conversation