# NOT RUN {
random <- TRUE
rr_comb <- c(0.25, 0.35, 0.4)
prob_comb_rr <- c(0.4, 0.4, 0.2)
rr_mono <- c(0.15, 0.20, 0.25)
prob_mono_rr <- c(0.2, 0.4, 0.4)
rr_back <- c(0.20, 0.25, 0.30)
prob_back_rr <- c(0.3, 0.4, 0.3)
rr_plac <- c(0.10, 0.12, 0.14)
prob_plac_rr <- c(0.25, 0.5, 0.25)
rr_transform <- list(
function(x) {return(c(0.75*(1 - x), (1-0.75)*(1-x), (1-0.75)*x, 0.75*x))},
function(x) {return(c(0.85*(1 - x), (1-0.85)*(1-x), (1-0.85)*x, 0.85*x))}
)
prob_rr_transform <- c(0.5, 0.5)
cohorts_max <- 5
trial_struc <- "stop_post_back"
safety_prob <- 0
sharing_type <- "concurrent"
sr_drugs_pos <- 5
sr_first_pos <- FALSE
n_int <- 50
n_fin <- 100
stage_data <- TRUE
cohort_random <- NULL
target_rr <- c(0,0,1)
cohort_offset <- 0
random_type <- "risk_difference"
cohort_fixed <- 5
# Vergleich Combo vs Mono
Bayes_Sup1 <- matrix(nrow = 3, ncol = 3)
Bayes_Sup1[1,] <- c(0.00, 0.90, 1.00)
Bayes_Sup1[2,] <- c(0.05, 0.65, 1.00)
Bayes_Sup1[3,] <- c(0.10, 0.50, 1.00)
# Vergleich Combo vs Backbone
Bayes_Sup2 <- matrix(nrow = 3, ncol = 3)
Bayes_Sup2[1,] <- c(0.05, 0.80, 1.00)
Bayes_Sup2[2,] <- c(NA, NA, NA)
Bayes_Sup2[3,] <- c(NA, NA, NA)
# Vergleich Mono vs Placebo
Bayes_Sup3 <- matrix(nrow = 3, ncol = 3)
Bayes_Sup3[1,] <- c(0.00, 0.90, 1.00)
Bayes_Sup3[2,] <- c(0.05, 0.65, 1.00)
Bayes_Sup3[3,] <- c(NA, NA, NA)
Bayes_Sup4 <- matrix(nrow = 3, ncol = 3)
Bayes_Sup4[1,] <- c(0.00, 0.90, 1.00)
Bayes_Sup4[2,] <- c(0.05, 0.65, 1.00)
Bayes_Sup4[3,] <- c(NA, NA, NA)
Bayes_Sup <- list(list(Bayes_Sup1, Bayes_Sup2, Bayes_Sup3, Bayes_Sup4),
list(Bayes_Sup1, Bayes_Sup2, Bayes_Sup3, Bayes_Sup4))
# Vergleich Combo vs Mono
Bayes_Fut1 <- matrix(nrow = 1, ncol = 2)
Bayes_Fut1[1,] <- c(0.00, 0.60)
# Vergleich Combo vs Backbone
Bayes_Fut2 <- matrix(nrow = 1, ncol = 2)
Bayes_Fut2[1,] <- c(0.00, 0.60)
# Vergleich Mono vs Placebo
Bayes_Fut3 <- matrix(nrow = 1, ncol = 2)
Bayes_Fut3[1,] <- c(0.00, 0.60)
Bayes_Fut4 <- matrix(nrow = 1, ncol = 2)
Bayes_Fut4[1,] <- c(0.00, 0.60)
Bayes_Fut <- list(list(Bayes_Fut1, Bayes_Fut2, Bayes_Fut3, Bayes_Fut4),
list(Bayes_Fut1, Bayes_Fut2, Bayes_Fut3, Bayes_Fut4))
a <- simulate_trial(
n_int = n_int, n_fin = n_fin, trial_struc = trial_struc, random_type = random_type,
rr_comb = rr_comb, rr_mono = rr_mono, rr_back = rr_back, rr_plac = rr_plac,
rr_transform = rr_transform, random = random, prob_comb_rr = prob_comb_rr,
prob_mono_rr = prob_mono_rr, prob_back_rr = prob_back_rr, prob_plac_rr = prob_plac_rr,
stage_data = stage_data, cohort_random = cohort_random, cohorts_max = cohorts_max,
sr_drugs_pos = sr_drugs_pos, target_rr = target_rr, sharing_type = sharing_type,
safety_prob = safety_prob, Bayes_Sup = Bayes_Sup, prob_rr_transform = prob_rr_transform,
cohort_offset = cohort_offset, sr_first_pos = sr_first_pos, Bayes_Fut = Bayes_Fut,
cohort_fixed = cohort_fixed
)
# }
Run the code above in your browser using DataLab