# Example 1 ----------------------------------
tbl_cuminc_ex1 <-
cuminc(Surv(ttdeath, death_cr) ~ 1, trial) %>%
tbl_cuminc(times = c(12, 24), label_header = "**Month {time}**")
# Example 2 ----------------------------------
tbl_cuminc_ex2 <-
cuminc(Surv(ttdeath, death_cr) ~ trt, trial) %>%
tbl_cuminc(times = c(12, 24),
outcomes = c("death from cancer", "death other causes"),
label_header = "**Month {time}**")
Run the code above in your browser using DataLab