# Example 1:
## Critical value for continuous binomial sequential analysis with
# a maximum sample size of 20 events, requiring at
# least 3 events to reject the null, and with a significance level of 0.05:
CV.Binomial(N=20,alpha=0.05,M=3,z=1.1)
# Example 2:
## Critical value for five-group sequential analysis with
# a maximum sample size of 25 events, requiring at
# least 1 event to reject the null, and with a significance level of 0.05:
result<- CV.Binomial(N=25,alpha=0.05,M=1,z=7/2,GroupSizes=5)
# if you type:
result
# then you will get the following output:
# [[1]]
# [1] 1.9852
# [[2]]
# [1] 0.04775995
# Example 3:
## Critical value for four-group sequential analysis with
# a maximum sample size of 50 events, requiring at
# least 1 event to reject the null, and with a significance level of 0.05:
result<- CV.Binomial(N=50,alpha=0.05,M=1,z=7/2,GroupSizes=c(10,10,15,15))
cv<- as.numeric(result[1])
# if you type:
cv
# then you will get the following output:
# [1] 1.99202
Run the code above in your browser using DataLab