cuminc | R Documentation |
Competing Risks Cumulative Incidence
## S3 method for class 'formula'
cuminc(formula, data, strata, rho = 0, conf.level = 0.95, ...)
cuminc(x, ...)
## Default S3 method:
cuminc(x, ...)
formula |
formula with |
data |
data frame |
strata |
stratification variable. Has no effect on estimates. Tests will be stratified on this variable. (all data in 1 stratum, if missing) |
rho |
Power of the weight function used in the tests. |
conf.level |
confidence level. Default is 0.95. |
... |
passed to methods |
x |
input object |
tidycuminc object
The confidence intervals for cumulative incidence estimates use the recommended method in Competing Risks: A Practical Perspective by Melania Pintilie.
x^{exp(±z * se / (x * log(x)))}
where x
is the cumulative incidence estimate, se
is the
standard error estimate, and z
is the z-score associated with the
confidence level of the interval, e.g. z = 1.96
for a 95% CI.
The p-values reported in cuminc()
, glance.tidycuminc()
and add_p.tbl_cuminc()
are Gray's test as described in
Gray RJ (1988) A class of K-sample tests for comparing the cumulative incidence of a competing risk, Annals of Statistics, 16:1141-1154.
Other cuminc() functions:
broom_methods_cuminc
# calculate risk for entire cohort -----------
cuminc(Surv(ttdeath, death_cr) ~ 1, trial)
# calculate risk by treatment group ----------
cuminc(Surv(ttdeath, death_cr) ~ trt, trial)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.