Calculates the sample size for a Poisson test (R.W. Payne & D.A. Murray).
Options
PRINT = string token |
What to print (replication , power ); default repl , powe |
---|---|
PRMETHOD = string token |
Method to be used to calculate the probabilities for the test (normalapproximation , exact ); default norm |
PROBABILITY = scalar |
Significance level for the test; default 0.05 |
POWER = scalar |
The required power (i.e. probability of detection) of the test; default 0.9 |
TMETHOD = string token |
Type of test to be done (onesided , twosided ); default ones |
NULL = scalar |
Mean under the null hypothesis for the one-sample test; must be set when MU2 is unset |
RATIOREPLICATION = scalar |
Ratio of replication sample2:sample1 (i.e. the size of sample 2 should be RATIOREPLICATION times the size of sample 1); default 1 |
REPLICATION = variate |
Replication values for which to calculate and print or save the power; default * takes 11 replication values centred around the required number of replicates |
Parameters
MU1 = scalars |
Mean to detect in sample 1 |
---|---|
MU2 = scalars |
Mean to detect in sample 2 |
NREPLICATES = scalars |
Saves the required number of replicates |
VREPLICATION = variates |
Numbers of replicates for which powers have been calculated |
VPOWER = variates |
Power (i.e. probability of detection) for the various numbers of replicates |
Description
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 NULL
option.
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 MU2
parameter.
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.
By default, SPNTEST
assumes a one-sided test is to be used, but you can set option TMETHOD=twosided
to take a two-sided test instead.
The PRINT
option controls printed output, with settings:
replication |
to print the required number of replicates in each sample (i.e. the size of each sample); |
---|---|
power |
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.
The 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 VREPLICATION
and 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.
Options: PRINT
, PRMETHOD
, PROBABILITY
, POWER
, TMETHOD
, NULL
, RATIOREPLICATION
, REPLICATION
.
Parameters: MU1
, MU2
, NREPLICATES
, VREPLICATION
, VPOWER
.
See also
Procedure: PNTEST
.
Commands for: Design of experiments.
Example
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