Computer programs for group sequential tests
Copyright, 24 August 1999, C Jennison.
cj@maths.bath.ac.uk
All rights reserved.
Permission to use, copy, modify, and distribute this software
and its documentation for any purpose, without fee, and without
a written agreement is hereby granted, provided that the above
copyright notice appears in all copies.
This code is released on an "as is" basis. There is no warranty.
Users are warned that the developers are not liable for any
errors or damages that occur as a result of using this code.
If you find these programs of help in your research we would ask
that you acknowledge their source in reports and publications.
Programs presented here perform calculations to construct and evaluate
group sequential tests. They are provided as a service to readers of
Group
Sequential Methods with Applications to Clinical Trials
by Christopher Jennison and Bruce W Turnbull.
The programs are presented using the notation of the book and, in
particular, the method of computation for normally distributed test
statistics is as described in our Chapter 19.
We have called on functions and subroutines in the NAG library for
certain standard calculations and you will need to substitute these if
you do not have access to the NAG library. We have created simple
functions and subroutines which do nothing other than call the NAG
library so that there is just one place to make each replacement.
We would appreciate evidence of any errors or difficulties in using
the programs  but note we only claim to provide subroutines and
program templates to help you in writing your own programs.
More userfriendly software is available commercially in the packages
EaSt and PEST.
We are extending this collection of programs as time permits. We hope,
eventually, to include routines for implementing all the key methods
reported in the book. If you have a particular request please send
email to cj@maths.bath.ac.uk
 but understand that we cannot make any firm promises.
To retrieve subroutines or a main program
 Click on the highlighted name. A listing will appear in the window.
 Click on File (top left hand corner) and select the Save option to
save as a FORTRAN file  in text format. The program should be ready to
compile and use.
Programs for normal response variables

Subroutines a collection of subroutines (all together in a
single file)
 GST1 calculates properties of a specified group sequential
onesided test.
 GST2 calculates properties of a specified group sequential
twosided test.
 ERSP2 creates boundaries for a twosided error spending test.
 NORCDF returns the cumulative distribution of a standard normal
distribution.
 INVNOR returns a quantile of the standard normal distribution.
 Main programs

MAIN1 creates onesided Pampallona & Tsiatis tests and calls
the subroutine GST1 to evaluate the tests' properties.

MAIN2 creates twosided boundaries of Pocock, O'Brien & Fleming
and, Wang & Tsiatis tests and calls the subroutine GST2 to evaluate the
tests' properties.

MAINES2 creates twosided boundaries using an error spending
function and calls the subroutine GST2 to evaluate the tests' properties.
Programs for binomial response variables

Subroutines a collection of subroutines (all together in a
single file)
 BGST calculates exit probabilities through upper and lower
boundaries for a group sequential test with Bernoulli responses.
 BPCI calculates probabilities of a group sequential test for
Bernoulli responses terminating in a more extreme state than a
particular observed outcome.
 BPRCAL calculates the distribution and cumulative distribution
function of a Binomial(n,p) random variable.
 FINDCI calculates a confidence interval for a Bernoulli success
probability on termination of a group sequential test.
 Main programs

BMAIN1 produces a table of confidence intervals for outcomes
of a 7 stage test taken from MIL STD 105D, plan Q 1.0.

BMAIN2 produces a table of confidence intervals for outcomes
of a 3 stage test taken from Fleming (Biometrics, 1982).

BMAIN3 calculates error rates and expected sample sizes under
two values of the success probability for a 3 stage test taken from
Fleming (Biometrics, 1982).

BMAIN4 produces a table of confidence intervals for outcomes
of a 2 stage test with early stopping at stage 1 only for a low number of
successes.