powered by
This function generates a table of competing risk analysis result with number of patients,number of event, number of competing event,
crisk_cat( csurv, cevent, cvars, gnames, month = 0, y1 = TRUE, y2 = TRUE, y5 = TRUE )
a tibble of competing risk analysis output.
the duration of follow-up time in months.
the status indicator, which is generally 0 = alive, 1 = event, 2 = other event
a vector, which has the variable's values (categorical only)
a text string, which is the name of the variable.
a number to get the month-rate of competing risk.
logical value indicating whether the 1-year competing risk rate should be reported.
logical value indicating whether the 2-year competing risk rate should be reported.
logical value indicating whether the 5-year competing risk rate should be reported.
Dat <- MASS::Melanoma Dat$time <- Dat$time/30.5 output <- crisk_cat(Dat$time, Dat$status, Dat$ulcer, "ulcer")
Run the code above in your browser using DataLab