surv_multiuni {survout} | R Documentation |
Modify the Output for Multiple Uni-variable Survival Analysis
Description
This function generates a table with the general survival analysis results, including the number of total patients, the number of sevents, the estimated median, the 1,2,5 year rate, the HR (95 percent confidence interval), the P value, the AIC, and the C index. This function just modifies the output table's format.
Usage
surv_multiuni(
dat,
stime,
sevent,
catvars = NULL,
convars = NULL,
y1 = TRUE,
y2 = TRUE,
y5 = TRUE,
medianCI = FALSE,
report_index = FALSE
)
Arguments
dat |
a dat.frame. |
stime |
the duration of follow-up time in months. |
sevent |
the status indicator, which is generally 0 = alive, 1 = dead. |
catvars |
a vector of categorical variable names. |
convars |
a vector of continuous variables names. |
y1 |
logical value indicating whether the 1-year survival rate should be reported. |
y2 |
logical value indicating whether the 2-year survival rate should be reported. |
y5 |
logical value indicating whether the 5-year survival rate should be reported. |
medianCI |
logical value indicating whether the 95 percent confidence interval of projected median survival should be reported. |
report_index |
logical value indicating if to report the show AIC and C index. |
Value
A tibble of survival output
Examples
Dat <- survival::lung
convars <- c("age","meal.cal")
catvars <- c("sex")
surv_multiuni(Dat, "time", "status", catvars, convars, medianCI = TRUE)