Competing Risks Cumulative Incidence

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

cuminc(x, ...)

# S3 method for default
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: autoplot.tidycuminc(), broom_methods_cuminc

Examples

# calculate risk for entire cohort -----------
cuminc(Surv(ttdeath, death_cr) ~ 1, trial)
#> 
#> ── cuminc() ────────────────────────────────────────────────────────────────────
#> 
#> • Failure type "death from cancer"
#> time   n.risk   estimate   std.error   95% CI          
#> 5.00   199      0.000      0.000       NA, NA          
#> 10.0   189      0.030      0.012       0.012, 0.061    
#> 15.0   158      0.120      0.023       0.079, 0.169    
#> 20.0   116      0.215      0.029       0.161, 0.274    
#> 
#> • Failure type "death other causes"
#> time   n.risk   estimate   std.error   95% CI          
#> 5.00   199      0.005      0.005       0.000, 0.026    
#> 10.0   189      0.025      0.011       0.009, 0.054    
#> 15.0   158      0.090      0.020       0.055, 0.135    
#> 20.0   116      0.205      0.029       0.152, 0.264    

# calculate risk by treatment group ----------
cuminc(Surv(ttdeath, death_cr) ~ trt, trial)
#> 
#> ── cuminc() ────────────────────────────────────────────────────────────────────
#> 
#> • Failure type "death from cancer"
#> strata   time   n.risk   estimate   std.error   95% CI          
#> Drug A   5.00   97       0.000      0.000       NA, NA          
#> Drug A   10.0   94       0.020      0.014       0.004, 0.065    
#> Drug A   15.0   83       0.071      0.026       0.031, 0.134    
#> Drug A   20.0   61       0.173      0.039       0.106, 0.255    
#> Drug B   5.00   102      0.000      0.000       NA, NA          
#> Drug B   10.0   95       0.039      0.019       0.013, 0.090    
#> Drug B   15.0   75       0.167      0.037       0.102, 0.246    
#> Drug B   20.0   55       0.255      0.043       0.175, 0.343    
#> 
#> • Failure type "death other causes"
#> strata   time   n.risk   estimate   std.error   95% CI          
#> Drug A   5.00   97       0.010      0.010       0.001, 0.050    
#> Drug A   10.0   94       0.020      0.014       0.004, 0.065    
#> Drug A   15.0   83       0.082      0.028       0.038, 0.147    
#> Drug A   20.0   61       0.204      0.041       0.131, 0.289    
#> Drug B   5.00   102      0.000      0.000       NA, NA          
#> Drug B   10.0   95       0.029      0.017       0.008, 0.077    
#> Drug B   15.0   75       0.098      0.030       0.050, 0.165    
#> Drug B   20.0   55       0.206      0.040       0.133, 0.289    
#> 
#> • Tests
#> outcome              statistic   df     p.value    
#> death from cancer    1.99        1.00   0.16       
#> death other causes   0.089       1.00   0.77