Skip to contents

Broom methods for smcure objects

Usage

# S3 method for class 'smcure'
tidy(x, exponentiate = FALSE, conf.int = FALSE, conf.level = 0.95, ...)

Arguments

x

An smcure object created by smcure::smcure()

exponentiate

Logical indicating whether or not to exponentiate the coefficient estimates. Defaults to FALSE.

conf.int

A Logical indicating whether or not to include a confidence interval in the tidied output. Defaults to FALSE.

conf.level

Level of the confidence interval. Default matches that in smcure(conf.level=) (typically, 0.95)

...

Additional arguments passed to other methods.

Value

a tibble

Examples

smcure <- smcure::smcure(Surv(ttdeath, death) ~ marker, cureform = ~marker,
 data = trial, model = "ph")
#> Program is running..be patient... done.
#> Call:
#> smcure::smcure(formula = Surv(ttdeath, death) ~ marker, cureform = ~marker, 
#>     data = trial, model = "ph")
#> 
#> Cure probability model:
#>                Estimate Std.Error    Z value  Pr(>|Z|)
#> (Intercept)  0.17534830 0.1663608  1.0540243 0.2918718
#> marker      -0.07737471 0.1838592 -0.4208367 0.6738743
#> 
#> 
#> Failure time distribution model:
#>          Estimate Std.Error   Z value  Pr(>|Z|)
#> marker 0.02216145 0.1296542 0.1709274 0.8642809

tidy(smcure)
#> $df_cure
#> # A tibble: 2 × 5
#>   term                    estimate std.error statistic p.value
#>   <chr>                      <dbl>     <dbl>     <dbl>   <dbl>
#> 1 (Intercept), Cure model   0.175      0.166     1.05    0.292
#> 2 marker, Cure model       -0.0774     0.184    -0.421   0.674
#> 
#> $df_surv
#> # A tibble: 1 × 5
#>   term                   estimate std.error statistic p.value
#>   <chr>                     <dbl>     <dbl>     <dbl>   <dbl>
#> 1 marker, Survival model   0.0222     0.130     0.171   0.864
#>