Programme POWER.EXE for sample size calculations

Introduction

This programme performs various sample size calculations. The programme was written by David Robson, and these notes by Nick Fieller, of Department of Probability and Statistics, University of Sheffield. The programme is based on a set of tables for such calculations produced by Machin and Campbell (1st edition). Some errors in their tables and the formulae they quote are corrected in this programme. Additionally, some approximations used by Machin and Campbell are improved. Consequently, this programme produces answers which are in some cases (slightly) different from those given by Machin and Campbell (1st Edition). We believe that in the case of disagreement, the preferred results are those given by this programme. It should be noted that a second edition of their tables (1997, Wiley) is accompanied by a programme Sample Size which offers much more extensive facilities than those available here.

To the best of our knowledge the calculations are accurate and valid but we can offer no guarantees and we accept no responsibility for loss or damage resulting from its use.

The two files are needed

power.exe (the executable programme)

Egavga.bgi (a graphics driver).

These two files should be in the same directory: it is suggested that you create a working directory to contain these two and that you use this directory for running the programme (see below).

NB Some web browsers may automatically add extensions to the names of files downloaded from the web. It is important that if you have downloaded the files from the Web that you check (e.g. with Windows Explorer) the names of the files and change them if necessary to exactly those shewn above.


Facilities

Given any two of the three quantities:

(1) Sample Size (2) Power (3) CRD (Clinicaly Relevant Difference)

this programme calculates the third (i.e. Sample Size for given power and CRD or CRD for given power and sample size etc.). Several values of each of two of these quantities may be entered simultaneously and a table will be produced the corresponding values of the third. A simple graphical display is available of the resulting table.

The significance level to be used, together with (where appropriate) the standard deviation and ratio between group sizes, must be specified.

These calculations are performed for the following tests:

¨  1-sample t-test (including paired t-test)

¨  2-sample t-test

¨  Log rank test

¨  Test for single binomial proportion

¨  Test for two binomial proportions

¨  Test on single correlation coefficient

¨  Mann-Whitney U-test

¨  Mcnemar’s test

¨  Multiple comparisons using 2-sample t-tests

¨  Cross-over trial comparisons

A basic help facility describing the tests is included and each menu has context sensitive instructions.

Operation

The programme runs from the DOS prompt (i.e. you need to open a DOS window --- it will not run from Windows Explorer or File Manager) Ensure that the two files power.exe and egavga.bgi are loaded in the same directory and that this directory is accessible from the current one (i.e. is either current or a PATH to it is active).

The programme is menu driven.

Use the arrow keys to navigate between items on different lines (up and down arrows) and between options on the same line (left and right arrows). The active option is highlighted in blue (or dark grey) and the alternative options in green (or light grey). Press ENTER to select highlighted option and move to next item or use up and down arrows to move to other items.

Highlight YES on the Perform Calculations item line and then press ENTER to proceed with calculations.

Operational Notes

To correct typing errors in option boxes position cursor over incorrect character using the arrow keys and either press DEL or overtype with correct value. Note that the Backspace key is not operational.

Values for the POWER should be entered as percentages (i.e. 90, 95 etc.)

Values for significance levels should be entered as decimal fractions (i.e. 0.05, 0.01 etc.)

Results for Power calculations are given as percentages and results for CRD calculations are given in units of standard deviations or as decimal fractions as appropriate (i.e. for t-tests etc. and binomial tests etc. respectively).

Pressing ESC takes control to previous menu. To quit the programme highlight YES at final check and press ENTER.

NRJF