cuminc {tidycmprsk}R Documentation

Competing Risks Cumulative Incidence

Description

Competing Risks Cumulative Incidence

Usage

## S3 method for class 'formula'
cuminc(formula, data, strata, rho = 0, conf.level = 0.95, ...)

cuminc(x, ...)

## Default S3 method:
cuminc(x, ...)

Arguments

formula

formula with Surv() on LHS and covariates on RHS. The event status variable must be a factor, with the first level indicating 'censor' and subsequent levels the competing risks. The Surv(time2=) argument cannot be used.

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

Value

tidycuminc object

Confidence intervals

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.

p-values

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.

See Also

Other cuminc() functions: broom_methods_cuminc

Examples

# calculate risk for entire cohort -----------
cuminc(Surv(ttdeath, death_cr) ~ 1, trial)

# calculate risk by treatment group ----------
cuminc(Surv(ttdeath, death_cr) ~ trt, trial)

[Package tidycmprsk version 1.0.0 Index]