Calculates the sample size for a Poisson test (R.W. Payne & D.A. Murray).
|What to print (
||Method to be used to calculate the probabilities for the test (
||Significance level for the test; default 0.05|
||The required power (i.e. probability of detection) of the test; default 0.9|
||Type of test to be done (
||Mean under the null hypothesis for the one-sample test; must be set when
||Ratio of replication sample2:sample1 (i.e. the size of sample 2 should be
||Replication values for which to calculate and print or save the power; default
||Mean to detect in sample 1|
||Mean to detect in sample 2|
||Saves the required number of replicates|
||Numbers of replicates for which powers have been calculated|
||Power (i.e. probability of detection) for the various numbers of replicates|
SPNTEST calculates the number of replicates (or sample size) required for a Poisson test. In the one-sample Poisson test, the data consist of a set of counts that are assumed to have been generated by the same Poisson distribution, and the sample size is the number of counts that have been observed. The mean that needs to be detected is specified by the
MU1 parameter, and the value from which it needs to be distinguished (i.e. the value under the null hypothesis) is specified by the
Alternatively, a two-sample test assesses the evidence that the there is a difference between the means of the Poisson distributions that have generated two separate samples of counts. The anticipated mean for the first sample is then specified by the
MU1 parameter, and the mean for the second sample is specified by the
PRMETHOD option defines the type of Poisson test that is to be done. The
normalapproximation indicates that the test will be based on the Normal approximation to the Poisson distribution. The
exact setting, which is available only for the one-sample test, does an exact test using the Poisson distribution. See the
PNTEST procedure for more information.
The significance level for the test is specified by the
PROBABILITY option (default 0.05 i.e. 5%). The required probability for detection of the difference between the means (that is, the power of the test) is specified by the
POWER option (default 0.9).
It is generally assumed that the sizes of the samples in the two-sample test should be equal. 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.
SPNTEST assumes a one-sided test is to be used, but you can set option
TMETHOD=twosided to take a two-sided test instead.
||to print the required number of replicates in each sample (i.e. the size of each sample);|
||to print a table giving the power (i.e. probability of detection) provided by a range of numbers of replicates.|
By default both are printed.
NREPLICATES parameter allows you to save the required size of the first sample. The replications and powers in the table can also be saved, in variates, using the
VPOWER parameters. The
REPLICATION option can specify the replication values for which to calculate and print or save the power; if this is not set, the default is to take 11 replication values centred around the required number of replicates.
Commands for: Design of experiments.
CAPTION 'SPNTEST example',\ !t('1) one-sample test, to detect a mean of 3,',\ 'against the null hypothesis that the mean is 2.'); STYLE=meta,plain SPNTEST [NULL=3; PRMETHOD=exact] 2 CAPTION '2) two-sample test, to distinguish samples with means of 5 and 10.' SPNTEST [TMETHOD=twosided] MU1=5; MU2=10