# Activate progress bar (optional)
if (FALSE) progressr::handlers(global = TRUE)
# Optimize
# \donttest{
set.seed(123) # This function relies on Monte Carlo integration
optimal_multiple_normal(Delta1 = 0.75,
Delta2 = 0.80, in1=300, in2=600, # define assumed true HRs
sigma1 = 8, sigma2= 12, # variances for both endpoints
n2min = 30, n2max = 90, stepn2 = 10, # define optimization set for n2
kappamin = 0.05, kappamax = 0.2, stepkappa = 0.05, # define optimization set for HRgo
alpha = 0.025, beta = 0.1, # planning parameters
c2 = 0.75, c3 = 1, c02 = 100, c03 = 150, # fixed/variable costs: phase II/III
K = Inf, N = Inf, S = -Inf, # set constraints
steps1 = 0, # define lower boundary for "small"
stepm1 = 0.5, # "medium"
stepl1 = 0.8, # and "large" effect size categories
b1 = 1000, b2 = 2000, b3 = 3000, # define expected benefit
rho = 0.5, relaxed = TRUE, # strict or relaxed rule
fixed = TRUE, # treatment effect
num_cl = 1) # parallelized computing
# }
Run the code above in your browser using DataLab