if (FALSE) { # rlang::is_installed("cmprsk")
library(cmprsk)
# time to loco-regional failure (lrf)
lrf_time <- rexp(100)
lrf_event <- sample(0:2, 100, replace = TRUE)
trt <- sample(0:1, 100, replace = TRUE)
strt <- sample(1:2, 100, replace = TRUE)
# fit model
x <- crr(lrf_time, lrf_event, cbind(trt, strt))
# summarize model fit with tidiers
tidy(x, conf.int = TRUE)
glance(x)
}
Run the code above in your browser using DataLab