# NOT RUN {
# Simon's two stage design
failure=c(0,3)
success=c(NA,4)
n=c(7,18)
p0=0.1
result.success=4
result.n=18
# without accounting for interim analysis when calculating
# the p-value
1-pbinom(result.success-1,result.n,p0)
# account for interim analysis
binom_one_alpha(result.success,result.n,p0,failure,success,n)
# }
Run the code above in your browser using DataLab