
Cumulative incidence function (Aalen-Johansen) for competing risks.
Source:R/survival.R
morie_survival_cif.RdWraps survival::survfit() with multi-state Surv().
Value
A named list with elements times, cif, ci_lower, ci_upper, event_of_interest, n_total, method.
Examples
set.seed(1)
time <- rexp(60); event <- sample(0:2, 60, replace = TRUE)
str(morie_survival_cif(time, event, event_of_interest = 1L), max.level = 1)
#> List of 7
#> $ times : num [1:60] 0.0373 0.0594 0.1061 0.1398 0.1457 ...
#> $ cif : num [1:60] 0 0.0167 0.0167 0.0167 0.0167 ...
#> $ ci_lower : num [1:60] 0 0.00239 0.00239 0.00239 0.00239 ...
#> $ ci_upper : num [1:60] 0 0.116 0.116 0.116 0.116 ...
#> $ event_of_interest: int 1
#> $ n_total : int 60
#> $ method : chr "Aalen-Johansen"