The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Cure Models with the Beta-Danish Distribution

Bilal Ahmad

Two cure formulations

The package implements two cure formulations on the Exponentiated Danish kernel:

Both are fitted via fit_bd_cure().

Quick example

Both fits below use simulated data with a known cure structure.

library(BetaDanish)
set.seed(2026)
n <- 250
z <- stats::rbinom(n, 1, 0.5)
pi_susc <- stats::plogis(0.3 + 0.7 * z)
cured   <- stats::rbinom(n, 1, 1 - pi_susc) == 1
T_true  <- ifelse(cured, Inf,
                  rbetadanish(n, a = 1, b = 2, c = 1.5, k = 0.4))
C   <- stats::rexp(n, 0.04)
time   <- pmin(T_true, C)
status <- ifelse(T_true <= C, 1, 0)
dat <- data.frame(time = time, status = status, z = z)
cat("Sample size:", n, " Censoring rate:", round(mean(status == 0), 2), "\n")
#> Sample size: 250  Censoring rate: 0.45

Mixture cure model

fit_mix <- fit_bd_cure(
  formula_aft  = survival::Surv(time, status) ~ 1,
  formula_cure = ~ z,
  data         = dat,
  type         = "mixture",
  n_starts     = 3
)
summary(fit_mix)
#> 
#> Call:
#> fit_bd_cure(formula_aft = survival::Surv(time, status) ~ 1, formula_cure = ~z, 
#>     data = dat, type = "mixture", n_starts = 3)
#> 
#> Beta-Danish Cure Model (mixture)
#> 
#>                   Estimate Std. Error z value Pr(>|z|)  
#> log_b              1.26173    0.52210  2.4166  0.01566 *
#> log_c              0.43147    0.19961  2.1616  0.03065 *
#> delta_(Intercept) -1.39644    0.75934 -1.8390  0.06591 .
#> gamma_(Intercept)  0.22464    0.19373  1.1596  0.24623  
#> gamma_z            0.56245    0.29138  1.9303  0.05357 .
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> ---
#> Log-Likelihood: -416.2507

Promotion-time cure model

fit_prom <- fit_bd_cure(
  formula_aft  = survival::Surv(time, status) ~ 1,
  formula_cure = ~ z,
  data         = dat,
  type         = "promotion",
  n_starts     = 3
)
summary(fit_prom)
#> 
#> Call:
#> fit_bd_cure(formula_aft = survival::Surv(time, status) ~ 1, formula_cure = ~z, 
#>     data = dat, type = "promotion", n_starts = 3)
#> 
#> Beta-Danish Cure Model (promotion)
#> 
#>                   Estimate Std. Error z value Pr(>|z|)  
#> log_b              1.56319    0.77860  2.0077  0.04468 *
#> log_c              0.39322    0.16852  2.3333  0.01963 *
#> delta_(Intercept) -2.03331    0.93058 -2.1850  0.02889 *
#> gamma_(Intercept) -0.19425    0.12818 -1.5155  0.12965  
#> gamma_z            0.33526    0.17055  1.9657  0.04933 *
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> ---
#> Log-Likelihood: -416.1921

See also

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.