# NOT RUN {
# 2-sided, symmetric 6-analysis trial Pocock
# spending function approximation
gsDesign(k=6, sfu=sfLDPocock, test.type=2)$upper$bound
# show actual Pocock design
gsDesign(k=6, sfu="Pocock", test.type=2)$upper$bound
# approximate Pocock again using a standard
# Hwang-Shih-DeCani approximation
gsDesign(k=6, sfu=sfHSD, sfupar=1, test.type=2)$upper$bound
# use 'best' Hwang-Shih-DeCani approximation for Pocock, k=6;
# see manual for details
gsDesign(k=6, sfu=sfHSD, sfupar=1.3354376, test.type=2)$upper$bound
# 2-sided, symmetric 6-analysis trial
# O'Brien-Fleming spending function approximation
gsDesign(k=6, sfu=sfLDOF, test.type=2)$upper$bound
# show actual O'Brien-Fleming bound
gsDesign(k=6, sfu="OF", test.type=2)$upper$bound
# approximate again using a standard Hwang-Shih-DeCani
# approximation to O'Brien-Fleming
x<-gsDesign(k=6, test.type=2)
x$upper$bound
x$upper$param
# use 'best' exponential approximation for k=6; see manual for details
gsDesign(k=6, sfu=sfExponential, sfupar=0.7849295,
test.type=2)$upper$bound
# }
Run the code above in your browser using DataLab