## Example 1
# Performance and alpha spending of group Poisson sequential analysis
# with a maximum sample size of 90 expected events for two-tailed
# testing, i.e. H0:RR=1, with irregular group sizes and different
# and lower and upper thresholds with irregular
# sample sizes 25, 20, 20, and 25.
# The statistical performance is evaluated for four different
# target RR= 1, 1.2, 2, 3:
# res<- Performance.Threshold.Poisson(SampleSize=90,CV.lower=c(2.5,2.6,2.7,2.8),
# CV.upper=c(3,3.1,3.2,3.3),GroupSizes=c(25,20,20,25),Tailed="two",
# Statistic="MaxSPRT",Delta="n",RR=c(1,1.2,2,3))
## Example 2
# Suppose that the Analyze.Poisson function was used for an actual analysis.
# For evaluating the cumulative power after a certain number of subsequent tests,
# one can enter with the critical values delivered by Analyze.Poisson in the
# Performance.Threshold.Poisson.
# For example, suppose that the following thresholds in the scale of the events
# were printed by Analyze.Poisson for the first three tests:
# cv.events<- c(2,3,5)
# which were obtained for the following specific sample sizes:
# mus<- c(0.05,0.5,1.2)
# Calculating the cumulative power, the expected time to signal, and
# the expected sample size for RR=2:
# res<-Performance.Threshold.Poisson(SampleSize=sum(mus),CV.events.upper=cv.events,
# GroupSizes=mus, Statistic="MaxSPRT",RR=2)
# This returns a power about 30%.
Run the code above in your browser using DataLab