Skip to contents

Finite-Sample Simulation Study for the Cure Model

Usage

bd_simulation_cure(
  n = c(100, 200),
  n_sim = 100,
  truth = c(b = 2, c = 1.5, k = 0.5),
  cure_fraction = 0.3,
  censor_rate = 0.2,
  type = c("mixture", "promotion"),
  n_starts = 3,
  level = 0.95,
  seed = NULL,
  quiet = FALSE
)

Arguments

n

Vector of sample sizes.

n_sim

Number of replicates at each sample size.

truth

Named vector with `b`, `c` and `k` for the susceptible population.

cure_fraction

True proportion of long-term survivors.

censor_rate

Approximate proportion of censoring among susceptibles.

type

`"mixture"` or `"promotion"`.

n_starts

Random starts per fit.

level

Nominal coverage level.

seed

Optional integer seed.

quiet

Logical; suppress progress messages.

Value

An object of class `"bd_simulation"`.

See also

[bd_simulation_study()], [fit_bd_cure()]

Examples

# \donttest{
s <- bd_simulation_cure(n = 80, n_sim = 2, n_starts = 1,
                        seed = 1, quiet = TRUE)
s
#> 
#> Beta-Danish simulation study: cure (mixture)
#>   replicates: 2   sample sizes: 80
#>   nominal coverage: 95%
#> 
#>   n parameter truth  mean    bias   rmse se_ratio coverage n_fail
#>  80         b   2.0 1.300 -0.7003 0.7003       NA        1      1
#>  80         c   1.5 8.197  6.6968 6.6968       NA        1      1
#> 
#>   Some replicates found no admissible optimum. A high count means
#>   the parameter region is hard to estimate at that sample size.
#> 
# }