tbl_cuminc | R Documentation |
Tabular Summary of Cumulative Incidence
## S3 method for class 'tidycuminc'
tbl_cuminc(
x,
times = NULL,
outcomes = NULL,
statistic = "{estimate}% ({conf.low}%, {conf.high}%)",
label = NULL,
label_header = "**Time {time}**",
estimate_fun = NULL,
conf.level = x$conf.level,
missing = NULL,
...
)
tbl_cuminc(x, ...)
x |
a 'tidycuminc' object created with |
times |
Numeric vector of times to obtain risk estimates at |
outcomes |
character vector of outcomes to include. Default is to include the first outcome. |
statistic |
string of statistic to report. Default is
|
label |
string indicating the variable label |
label_header |
string for the header labels; uses glue syntax.
Default is |
estimate_fun |
function that styles and formats the statistics.
Default is |
conf.level |
Level of the confidence interval. Default matches that in
|
missing |
string to replace missing values with. Default is an
em-dash, |
... |
not used |
Example 1
Example 2
Other tbl_cuminc tools:
add_cuminc
# Example 1 ----------------------------------
tbl_cuminc_ex1 <-
cuminc(Surv(ttdeath, death_cr) ~ 1, trial) %>%
tbl_cuminc(times = c(12, 24), label_header = "**Month {time}**")
# Example 2 ----------------------------------
tbl_cuminc_ex2 <-
cuminc(Surv(ttdeath, death_cr) ~ trt, trial) %>%
tbl_cuminc(times = c(12, 24),
outcomes = c("death from cancer", "death other causes"),
label_header = "**Month {time}**")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.