SPRECISION procedure
Calculates the sample size to obtain a specified precision (R.W. Payne).
Options
Parameters
Description
SPRECISION calculates the number of replicates (or sample size) required to estimate a sample mean, or the difference between the means of two samples to a specified precision. The number of samples is specified by the NSAMPLES option (default 2). The precision is obtained by calculating a confidence interval around the sample mean or difference of means, and represents half the width of the interval. (The interval is generated by a t distribution, so this represents the distance of the mean or difference between means and the lower or the upper limits of the interval.) The probability level for the interval is specified by the CIPROBABILITY option (default 0.95 i.e. 95%).
The required precision is supplied by the PRECISION parameter. The variances of the first and second samples are supplied by the VAR1 and VAR2 parameters. VAR2 can be omitted if there is only one sample, or the two samples have equal variances. It is generally assumed that the second sample (if present) should be the same size as the first sample. However, you can set the RATIOREPLICATION option to a scalar, R say, to indicate that the size of the second sample should be R times the size of the first sample. The NREPLICATES parameter allows you to save the required size of the first sample.
The PRINT option controls printed output, with settings:
By default both are printed.
The replications and corresponding detection probabilities in the table can also be saved, in variates, using the VREPLICATION and VPRDETECTION parameters. The REPLICATION option can specify the replication values for which to calculate and print or save the probabilities of detection; if this is not set, the default is to take 11 replication values centred around the required number of replicates.
Options: PRINT, NSAMPLES, CIPROBABILITY, RATIOREPLICATION, REPLICATION.
Parameters: PRECISION, VAR1, VAR2, NREPLICATES, VREPLICATION, VPRECISION.
Method
An approximate number of replicates is calculated initially assuming a Normal approximation. This is then refined by calculating powers for a range of replications centred around that approximation.