# original group sequential design with 90% power to detect delta = 6
delta = 6
sigma = 17
n = 282
(des1 = getDesign(IMax = n/(4*sigma^2), theta = delta, kMax = 3,
alpha = 0.05, typeAlphaSpending = "sfHSD",
parameterAlphaSpending = -4))
# interim look results
L = 1
n1 = n/3
delta1 = 4.5
sigma1 = 20
zL = delta1/sqrt(4/n1*sigma1^2)
t = des1$byStageResults$informationRates
# Muller & Schafer (2001) method to design the secondary trial:
des2 = adaptDesign(
betaNew = 0.2, L = L, zL = zL, theta = 5,
kMax = 3, informationRates = t,
alpha = 0.05, typeAlphaSpending = "sfHSD",
parameterAlphaSpending = -4,
MullerSchafer = TRUE,
kNew = 3, typeAlphaSpendingNew = "sfHSD",
parameterAlphaSpendingNew = -2)
n2 = ceiling(des2$secondaryTrial$overallResults$information*4*20^2)
ns = round(n2*(1:3)/3)
(des2 = adaptDesign(
INew = n2/(4*20^2), L = L, zL = zL, theta = 5,
kMax = 3, informationRates = t,
alpha = 0.05, typeAlphaSpending = "sfHSD",
parameterAlphaSpending = -4,
MullerSchafer = TRUE,
kNew = 3, informationRatesNew = ns/n2,
typeAlphaSpendingNew = "sfHSD",
parameterAlphaSpendingNew = -2))
# termination at the second look of the secondary trial
L2 = 2
delta2 = 6.86
sigma2 = 21.77
zL2 = delta2/sqrt(4/197*sigma2^2)
t2 = des2$secondaryTrial$byStageResults$informationRates[1:L2]
# confidence interval
getADCI(L = L, zL = zL,
IMax = n/(4*sigma1^2), kMax = 3,
informationRates = t,
alpha = 0.05, typeAlphaSpending = "sfHSD",
parameterAlphaSpending = -4,
L2 = L2, zL2 = zL2,
INew = n2/(4*sigma2^2),
MullerSchafer = TRUE,
informationRatesNew = t2,
typeAlphaSpendingNew = "sfHSD",
parameterAlphaSpendingNew = -2)
Run the code above in your browser using DataLab