# Setup: 2 active arms vs control and 3 sequential looks.
# Information levels: equal spacing over 3 looks based on a maximum of
# 95 patients per arm, SD = 1.0
I <- 95 / (2 * 1.0^2) * seq(1, 3)/3
# O'Brien-Fleming critical values
b <- c(3.886562, 2.748214, 2.243907)
# Type I error under the global null hypothesis
p0 <- exitprob_multiarm(M = 2, theta = c(0, 0), kMax = 3,
b = b, I = I, nthreads = 1)
cumsum(p0$exitProbUpper)
# Power under alternative: Treatment effects of 0.3 and 0.5
p1 <- exitprob_multiarm(M = 2, theta = c(0.3, 0.5), kMax = 3,
b = b, I = I, nthreads = 1)
cumsum(p1$exitProbUpper)
Run the code above in your browser using DataLab