Functions for tidycuminc objects
# S3 method for class 'tidycuminc'
model.frame(formula, ...)
# S3 method for class 'tidycuminc'
model.matrix(object, ...)
a model frame, or model matrix
fit <- cuminc(Surv(ttdeath, death_cr) ~ trt, trial)
model.matrix(fit) %>% head()
#> trtDrug B
#> 1 0
#> 2 1
#> 3 0
#> 4 0
#> 5 0
#> 6 1
model.frame(fit) %>% head()
#> Surv(ttdeath, death_cr) trt
#> 1 24.00+ Drug A
#> 2 24.00+ Drug B
#> 3 24.00+ Drug A
#> 4 17.64:death other causes Drug A
#> 5 16.43:death other causes Drug A
#> 6 15.64:death from cancer Drug B