I plotted cumulative incidence curves using this model fit:
cuminc(Surv(time, outcome) ~ time_per, data)
When I try plugging my data into pairwise_survdiff()
pairwise_survdiff(Surv(time, outcome) ~ time_per, data)
I get this warning message:
Warning messages:
1: In Surv(exposure_time, outcome) : Invalid status value, converted to NA
2: In Surv(exposure_time, outcome) : Invalid status value, converted to NA
3: In Surv(exposure_time, outcome) : Invalid status value, converted to NA
It's because my outcome variable has 3 levels (0=censored, 1=event of interest, 2=competing event). Is there a different method that I can use?