Functions to calculate sample size for group sequential designs

```
gsdesign.binomial(ifrac, pC, pE, sig.level = 0.05, power = 0.8,
delta.eb=0.5, delta.fb = NULL, alternative = c("two.sided",
"one.sided"), pooled.variance = FALSE, CPS = TRUE, tol=0.00001, ...)
gsdesign.normal(ifrac, delta, sd = 1, sig.level = 0.05,
power = 0.8, delta.eb = 0.5, delta.fb = NULL, alternative =
c("two.sided", "one.sided"), tol=0.00001, ...)
gsdesign.survival(ifrac, haz.ratio, sig.level = 0.05,
power = 0.8, delta.eb = 0.5, delta.fb = NULL, alternative =
c("two.sided", "one.sided"), tol=0.00001, ...)
```

ifrac

information fraction or the ratio of current sample size or number of events to the total sample size or number of events. This should be an increasing vector of numbers from 0 to 1 with the last one being 1. If just 1 is given a fixed sample design is derived.

pC

prob of success of the standard therapy (for binomial data)

pE

prob of success of the experimental therapy (for binomial data)

delta

true difference in means (for normal data)

sd

standard deviation (for normal data)

haz.ratio

hazard ratio (for survival comparison)

sig.level

significance level (type I error probability)

power

power of test (1 minus type II error probability)

delta.eb

power for efficacy boundary in the Pocock (=0) to O'Brien-Fleming (=0.5) family (default is 0.5)

delta.fb

power for futility boundary in the Pocock (=0) to O'Brien-Fleming (=0.5) family (default is NULL i.e. no futility boundary is requested.)

alternative

one- or two-sided test.

pooled.variance

whether the test statistic is standardized by pooled (2*pbar*(1-pbar)) or unpooled variance (pC*(1-pC) + pE*(1-pE)). Default is unpooled variance.

CPS

whether continuity correction is used for sample size calculation as in Casagrande, Pike & Smith. Default is to use it.

tol

tolerance level for multivariate normal probability computation.

...

additional options passed on the pmvnorm function.

a list with ifrac, sig.level, power, alternative, delta.eb, delta.fb and:

the critical value to use at the different looks.

the critical value to use at the different looks.

the sample size per arm for binomial/normal data.

the total number of failures which should be converted to number of subjects using censoring proportion.

The futility boundary is not returned when delta.fb is not specified i.e. stopping for futility is not requested. The futility boundary is non-binding. That is the significance level is not adjusted to account for early stopping for utility. This makes the test a bit conservative in that the true size is less than the nominal level.

The Casagrande-Pike-Smith type continuity correction is obtained using the formula n*1 + sqrt1+4/abs(pC-pE)*n^2 where n is the uncorrected sample size.