Skip to contents

K-index estimation

Usage

.calc_k_index(object, newdata = NULL)

Arguments

object

a cureit model object or a coxph model object

newdata

A base::data.frame() or tibble::tibble() containing all the original predictors used to create object. Defaults to NULL.

Examples


p <- cureit(surv_formula = Surv(ttdeath, death) ~ age, 
   cure_formula = ~ age,
   data = trial) 
#> Warning: 0 of 100 did not converge.
.calc_k_index(p)
#> [1] 0.5132231

cox_p <- survival::coxph(Surv(ttdeath, death) ~ age,
   data = trial)

# Need to debug this
# .calc_k_index(cox_p)