Stack simulations_collection results vertically
Arguments
- sim_map
object of type
simulations_collection- target_dose
optional integer vector, the dose of interest. All doses are analysed if omitted, which is the default.
- alpha
confidence level for asymptotic normal confidence intervals. The default value is 0.05 to get 95 percent confidence intervals.
Examples
# In a five-dose scenario, we have assumed probabilities for Prob(tox):
true_prob_tox <- c(0.05, 0.10, 0.15, 0.18, 0.45)
# and Prob(eff):
true_prob_eff <- c(0.40, 0.50, 0.52, 0.53, 0.53)
# Let us compare two BOIN12 variants that differ in their stopping params:
designs <- list(
"BOIN12 v1" = get_boin12(num_doses = 5,
phi_t = 0.35, phi_e = 0.25,
u2 = 40, u3 = 60,
c_t = 0.95, c_e = 0.9) %>%
stop_at_n(n = 36),
"BOIN12 v2" = get_boin12(num_doses = 5,
phi_t = 0.35, phi_e = 0.25,
u2 = 40, u3 = 60,
c_t = 0.5, c_e = 0.5) %>%
stop_at_n(n = 36)
)
# For illustration we run only 10 iterates:
x <- simulate_compare(
designs,
num_sims = 10,
true_prob_tox,
true_prob_eff
)
#> Running BOIN12 v1
#> Running BOIN12 v2
stack_sims_vert(x)
#> # A tibble: 100 × 9
#> dose hit r n design .rate .se .l .u
#> <int> <lgl> <int> <int> <chr> <dbl> <dbl> <dbl> <dbl>
#> 1 1 TRUE 1 1 BOIN12 v1 1 0 1 1
#> 2 1 FALSE 1 2 BOIN12 v1 0.5 0.354 -0.193 1.19
#> 3 1 FALSE 1 3 BOIN12 v1 0.333 0.272 -0.200 0.867
#> 4 1 FALSE 1 4 BOIN12 v1 0.25 0.217 -0.174 0.674
#> 5 1 FALSE 1 5 BOIN12 v1 0.2 0.179 -0.151 0.551
#> 6 1 FALSE 1 6 BOIN12 v1 0.167 0.152 -0.132 0.465
#> 7 1 FALSE 1 7 BOIN12 v1 0.143 0.132 -0.116 0.402
#> 8 1 FALSE 1 8 BOIN12 v1 0.125 0.117 -0.104 0.354
#> 9 1 FALSE 1 9 BOIN12 v1 0.111 0.105 -0.0942 0.316
#> 10 1 FALSE 1 10 BOIN12 v1 0.1 0.0949 -0.0859 0.286
#> # ℹ 90 more rows
