crisk_multiuni {survout} | R Documentation |
Modify the Output for Multiple Uni-variable Competing Risk Analysis .
Description
This function generates a table of competing risk analysis result with number of patients, number of event, number of competing event,
Usage
crisk_multiuni(
dat,
csurv,
cevent,
catvars = NULL,
convars = NULL,
ordvars = NULL,
y1 = TRUE,
y2 = TRUE,
y5 = TRUE,
month = 0
)
Arguments
dat |
a data.frame in which to interpret the variables. |
csurv |
this is the follow up time. |
cevent |
the status indicator, normally 0=alive, 1=dead. |
catvars |
a vector of cat variable names. |
convars |
a vector of con variable names. |
ordvars |
a vector of ordinal variable names. |
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. |
month |
a number to get the month-rate of competing risk. |
Value
a tibble of competing risk analysis output.
Examples
Dat <- MASS::Melanoma
Dat$time <- Dat$time/30.5
Dat$ulcer <- as.factor(Dat$ulcer)
con_var <- c("age")
ord_var <- c("ulcer")
cat_var <- c("sex")
uni_out <- crisk_multiuni(Dat, "time", "status",cat_var, con_var, ord_var)
[Package survout version 0.1.0 Index]