|Controls printed output (
||Type of test required (
||Form of the test for one-sample test (
||Sample size for sample 1; default 1|
||Sample size for sample 2; default 1|
||The probability level for the confidence interval; default 0.95|
||The value of the probability of success under the null hypothesis for the one-sample test|
||Numbers recorded in the first sample|
||Numbers recorded in the second sample|
||Saves the Normal approximation|
||Saves the probability value from the one-sample or two-sample tests|
||Saves the lower limit of the confidence interval|
||Saves the upper limit of the confidence interval|
PNTEST calculates one- and two-sample Poisson tests. The value for the mean under the null hypothesis for a one-sample test is specified by the option
NULL. You can supply the sample mean m1 as a scalar using the
MU1 parameter. The sample size is then specified by the
S1 option (with default 1). Alternatively, you can set
MU1 to a variate containing the counts in the individual samples (and the sample size is then the number of non-missing values that it contains). With a two-sample test, parameters
MU2 similarly provide the means (m1 and m2) for samples 1 and 2 respectively, and the sample sizes can be specified using the
For both one- and two-sample cases, the test is assumed to be two-sided unless otherwise requested by the
METHOD option. Setting
METHOD=greaterthan will give a one-sided test of the null hypothesis that m1 > m2 or
NULL (for a two-sample or one-sample test, respectively). Similarly,
METHOD=lessthan will produce a test of the null hypothesis m1 < m2 or
NULL. A small “p-value” indicates that the data are inconsistent with the null hypothesis. The
TEST option specifies the form of test used for the one-sample test; either an exact test or a Normal approximation can be selected.
Printed output is controlled by the
||mean, sample size, standard error (for Normal approximation);|
||Normal approximation and probability level, or just probability level for the exact test;|
||confidence interval for the difference between the mean and
The default is to print everything.
By default a 95% confidence interval is calculated, but this can be changed by setting the
CIPROBABILITY option to the required value (between 0 and 1).
Results can be saved using the
NORMAL saves the Normal approximation for the one- and two-sample tests,
PROBABILITY saves the probability level.
UPPER save the lower and upper limits, respectively, of the confidence interval.
A standard Normal approximation is used for both the one- and two-sample tests. The exact test and confidence intervals are based on the methodology described in Chapter 4 (page 141) of Arimitage & Berry (1994).
Arimitage, P. & Berry, G. (1994). Statistical Methods in Medical Research. Blackwell Science, Oxford.
CAPTION 'PNTEST example',\ !t('Data from Armitage & Berry (1994), Statistical Methods in',\ 'Medical Research, pages 142 and 145.');\ STYLE=meta,plain PNTEST [NULL=20] MU1=33 CAPTION 'One-sample test, using exact test and confidence intervals.' PNTEST [NULL=20; TEST=exact] MU1=33 CAPTION 'One-sample test, one-sided.' PNTEST [NULL=20; METHOD=greater] MU1=33 CAPTION !t('Two-sample test, saving Normal approximation,',\ 'probability and confidence interval.') PNTEST MU1=13;MU2=31; NORMAL=norm; PROBABILITY=prob; LOWER=lower; UPPER=upper PRINT norm,prob,lower,upper