crisk_ord {survout} | R Documentation |
Modify the Output for Uni-variable and Multi-variable Competing Risk Analysis (Ordinal Only)
Description
This function generates a table of competing risk analysis result with number of patients, number of event, number of competing event,
Usage
crisk_ord(
csurv,
cevent,
cvars,
gnames,
month = 0,
y1 = TRUE,
y2 = TRUE,
y5 = TRUE
)
Arguments
csurv |
the duration of follow-up time in months. |
cevent |
the status indicator, which is generally 0 = alive, 1 = event, 2 = other event |
cvars |
a vector, which has the variable's values (ordinal only) |
gnames |
a text string, which is the name of the variable. |
month |
a number to get the month-rate of competing risk. |
y1 |
logical value indicating whether the 1-year competing risk rate should be reported. |
y2 |
logical value indicating whether the 2-year competing risk rate should be reported. |
y5 |
logical value indicating whether the 5-year competing risk rate should be reported. |
Value
a tibble of competing risk analysis output.
Examples
Dat <- MASS::Melanoma
Dat$time <- Dat$time/30.5
output <- crisk_ord(Dat$time, Dat$status, as.factor(Dat$year), "year")
[Package survout version 0.1.0 Index]