Skip to contents

Cure Model Regression

Usage

# S3 method for class 'formula'
cureit(
  surv_formula,
  cure_formula,
  data,
  conf.level = 0.95,
  nboot = 100,
  eps = 1e-07,
  ...
)

cureit(object, ...)

# Default S3 method
cureit(object, ...)

Arguments

surv_formula

formula with Surv() on LHS and covariates on RHS.

cure_formula

formula with covariates for cure fraction on RHS

data

data frame

conf.level

confidence level. Default is 0.95.

nboot

number of bootstrap samples used for inference. Default number is 100.

eps

convergence criterion for the EM algorithm.

...

passed to methods

object

input object

Value

cureit object. The output includes the following:

  • surv_coefs

  • cure_coefs

  • surv_formula

  • cure_formula

  • data

  • conf.level

  • nboot

  • eps

  • surv_xlevels

  • cure_xlevels

  • tidy

  • smcure

  • surv_blueprint

  • cure_blueprint

  • blueprint

See also

Examples


cureit_obj <- cureit(surv_formula = Surv(ttdeath, death) ~ age + grade, 
cure_formula = ~ age + grade,  data = trial, nboot = 10)
#> Warning: 0 of 10 did not converge.

# pulling survival coeffients
cureit_obj$surv_coefs
#>       age, Survival model  grade_ii, Survival model grade_iii, Survival model 
#>              -0.002616112               0.569504769               0.345883977 

# pulling cure coefficients
cureit_obj$coefs
#> NULL

# `tidy` object of survival model output
cureit_obj$tidy$df_surv
#> # A tibble: 3 × 7
#>   term                   estimate std.error statistic conf.low conf.high p.value
#>   <chr>                     <dbl>     <dbl>     <dbl>    <dbl>     <dbl>   <dbl>
#> 1 age, Survival model    -0.00262   0.00957    -0.273 -0.0214     0.0161  0.785 
#> 2 grade_ii, Survival mo…  0.570     0.291       1.95  -0.00180    1.14    0.0507
#> 3 grade_iii, Survival m…  0.346     0.235       1.47  -0.115      0.807   0.141 

# `tidy` object of cure model output
cureit_obj$tidy$df_cure
#> # A tibble: 4 × 7
#>   term                   estimate std.error statistic conf.low conf.high p.value
#>   <chr>                     <dbl>     <dbl>     <dbl>    <dbl>     <dbl>   <dbl>
#> 1 (Intercept), Cure mod… -0.575      0.576     -0.998  -1.70      0.554    0.318
#> 2 age, Cure model         0.00981    0.0102     0.965  -0.0101    0.0298   0.335
#> 3 grade_ii, Cure model    0.109      0.346      0.314  -0.569     0.786    0.754
#> 4 grade_iii, Cure model   0.824      0.502      1.64   -0.160     1.81     0.101