Finite-Sample Simulation Study for the Cure Model
Source:R/simulation_study.R
bd_simulation_cure.RdFinite-Sample Simulation Study for the Cure Model
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.
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.
#>
# }