# NOT RUN {
random <- TRUE
rr_comb1 <- 0.10
prob_comb1_rr <- 1
rr_comb2 <- 0.45
prob_comb2_rr <- 1
rr_plac1 <- 0.10
prob_plac1_rr <- 1
rr_plac2 <- 0.20
prob_plac2_rr <- 1
correlation <- 0.8
cohorts_start <- 2
cohorts_max <- 5
safety_prob <- 0
sharing_type <- "concurrent"
sr_drugs_pos <- 5
sr_first_pos <- FALSE
n_fin <- 100
stage_data <- TRUE
cohort_random <- 0.01
cohort_offset <- 0
cohorts_sim <- Inf
random_type <- "absolute"
missing_prob <- 0.2
cohort_fixed <- 5
hist_lag <- 48
analysis_times <- c(0.5, 0.75, 1)
accrual_type <- "fixed"
accrual_param <- 9
time_trend <- 0.001
composite <- "or"
# Comparison IA1
Bayes_Sup11 <- matrix(nrow = 2, ncol = 2)
Bayes_Sup11[1,] <- c(0.00, 0.95)
Bayes_Sup11[2,] <- c(0.10, 0.80)
# Comparison IA2
Bayes_Sup12 <- matrix(nrow = 2, ncol = 2)
Bayes_Sup12[1,] <- c(0.00, 0.95)
Bayes_Sup12[2,] <- c(0.10, 0.80)
# Comparison IA3
Bayes_Sup13 <- matrix(nrow = 2, ncol = 2)
Bayes_Sup13[1,] <- c(0.00, 0.95)
Bayes_Sup13[2,] <- c(0.10, 0.80)
Bayes_Sup1 <- Bayes_Sup2 <- list(list(Bayes_Sup11), list(Bayes_Sup12), list(Bayes_Sup13))
# Comparison IA1
Bayes_Fut11 <- matrix(nrow = 1, ncol = 2)
Bayes_Fut11[1,] <- c(0.00, 0.20)
# Comparison IA2
Bayes_Fut12 <- matrix(nrow = 1, ncol = 2)
Bayes_Fut12[1,] <- c(0.00, 0.30)
# Comparison IA3
Bayes_Fut13 <- matrix(nrow = 1, ncol = 2)
Bayes_Fut13[1,] <- c(NA, NA)
# Endpoint 1+2
Bayes_Fut1 <- Bayes_Fut2 <- list(list(Bayes_Fut11), list(Bayes_Fut12), list(Bayes_Fut13))
simulate_trial(
n_fin = n_fin, random_type = random_type, composite = composite,
rr_comb1 = rr_comb1, rr_comb2 = rr_comb2, rr_plac1 = rr_plac1, rr_plac2 = rr_plac2,
random = random, prob_comb1_rr = prob_comb1_rr, prob_comb2_rr = prob_comb2_rr,
prob_plac1_rr = prob_plac1_rr, prob_plac2_rr = prob_plac2_rr, correlation = correlation,
stage_data = stage_data, cohort_random = cohort_random, cohorts_max = cohorts_max,
sr_drugs_pos = sr_drugs_pos, sharing_type = sharing_type, Bayes_Fut1 = Bayes_Fut1,
safety_prob = safety_prob, Bayes_Sup1 = Bayes_Sup1, Bayes_Sup2 = Bayes_Sup2,
cohort_offset = cohort_offset, sr_first_pos = sr_first_pos, Bayes_Fut2 = Bayes_Fut2,
missing_prob = missing_prob, cohort_fixed = cohort_fixed, accrual_type = accrual_type,
accrual_param = accrual_param, hist_lag = hist_lag, analysis_times = analysis_times,
time_trend = time_trend, cohorts_start = cohorts_start, cohorts_sim = cohorts_sim
)
# }
Run the code above in your browser using DataLab