surv_multiuni | R Documentation |
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.
surv_multiuni( dat, stime, sevent, catvars = NULL, convars = NULL, y1 = TRUE, y2 = TRUE, y5 = TRUE, medianCI = FALSE, report_index = FALSE )
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. |
A tibble of survival output
Dat <- survival::lung convars <- c("age","meal.cal") catvars <- c("sex") surv_multiuni(Dat, "time", "status", catvars, convars, medianCI = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.