crisk_multiuni | R Documentation |
This function generates a table of competing risk analysis result with number of patients, number of event, number of competing event,
crisk_multiuni( dat, csurv, cevent, catvars = NULL, convars = NULL, ordvars = NULL, y1 = TRUE, y2 = TRUE, y5 = TRUE, month = 0 )
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. |
a tibble of competing risk analysis output.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.