# NOT RUN {
scenarios_list <- simulateScenarios(
n_subjects_list = list(c(10, 20, 30)),
response_rates_list = list(c(0.1, 0.1, 0.9)),
n_trials = 10)
analyses_list <- performAnalyses(
scenario_list = scenarios_list,
target_rates = rep(0.5, 3),
n_mcmc_iterations = 100)
## Decision rule for more than one cohort
decisions_list <- getGoDecisions(
analyses_list = analyses_list,
cohort_names = c("p_1", "p_2", "p_3"),
evidence_levels = c(0.5, 0.5, 0.8),
boundary_rules = quote(c(x[1] > 0.7, x[2] < 0.3, x[3] < 0.6)))
## Decision rule for only two of the three cohorts
decisions_list <- getGoDecisions(
analyses_list = analyses_list,
cohort_names = c("p_1", "p_3"),
evidence_levels = c(0.5, 0.8),
boundary_rules = quote(c(x[1] > 0.7, TRUE, x[3] < 0.6)),
overall_min_gos = 2L)
## Different decision rules for each method
## This works the same way for the different evidence_levels
decisions_list <- getGoDecisions(
analyses_list = analyses_list,
cohort_names = c("p_1", "p_2", "p_3"),
evidence_levels = c(0.5, 0.5, 0.8),
boundary_rules = list(quote(c(x[1] > 0.1, x[2] < 0.5, x[3] < 0.1)), # "berry"
quote(c(x[1] > 0.2, x[2] < 0.4, x[3] < 0.2)), # "exnex"
quote(c(x[1] > 0.3, x[2] < 0.3, x[3] < 0.3)), # "exnex_adj"
quote(c(x[1] > 0.4, x[2] < 0.2, x[3] < 0.4)), # "pooled"
quote(c(x[1] > 0.5, x[2] < 0.1, x[3] < 0.5)))) # "stratified"
# }
Run the code above in your browser using DataLab