I'm plotting CIF survival curves using cmprsk:
cc<-cuminc(fu_m, event, diabetes, rho=0, cencode=0,
na.action=na.omit)
plot(cc,lty=1:6,color=1, xlab="Months", ylab="Cumulative Incidence")
In this way I obtain 4 curves: event in presence/absence of diabetes and competing event in presence/absence of diabetes.
I would like to have just two curves:event in presence/absence of diabetes without the competing events' curves.
> str(event)
Factor w/ 3 levels "0","1","2": 1 3 2 1 2 1 1 2 1 1 ...
> str(diabetes)
Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
Event 0: censured observations, 1: event, 2: competing event
Diabetes 0: no diabetes, 1: presence of diabetes
How can I fix it? Thank you all