SIGNTEST procedure
Performs a one or two sample sign test (E. Stephens & P.W. Goedhart).
Options
Parameters
Description
The sign test is a nonparametric test for difference in location between two related samples, or for testing the location of a single sample. The data values are specified by the parameters Y1 and Y2 and the option GROUPS. For a one-sample test, the Y1 parameter should be set to a variates containing the data. The data for a two-sample test can either be specified in two separate variates using the parameters Y1 and Y2. Alternatively, they can be given in a single variate, with the GROUPS option set to a factor to identify the two samples; the units are then assumed to be specified in the same order within each group. The GROUPS option is ignored when the Y2 parameter is set. The NULL option defines the size of the median under the null hypothesis for a one-sample test, or the difference between the two medians in a two-sample test. By default NULL=0.
The test is assumed to be two-sided unless otherwise requested by the METHOD option. Settings greaterthan or lessthan will give one-sided tests for the median or the difference between medians greater than, or less than, the null hypothesis value respectively.
In a one-sample test, units that are equal to the null hypothesis median are excluded and the effective sample-size is reduced. Similarly, in a two-sample test, units are excluded where the differences between the pairs of values are equal to that required by the null hypothesis. Units with missing values are also excluded.
By default, SIGNTEST prints the test statistic, the effective sample size and the (exact) probability level. This information can also be saved in named scalars using the STATISTIC, NBINOMIAL and PROBABILITY parameters repectively, and printing can be suppressed by setting option PRINT=*.
Options: PRINT, METHOD, GROUPS, NULL.
Parameters: Y1, Y2, STATISTIC, NBINOMIAL, PROBABILITY.
Method
The procedure uses standard GenStat directives for calculation and manipulation.
Action with
RESTRICT
If the variates or the factor are restricted, the test is calculated using only the units not excluded by the restriction. In a two-sample test, the two variates or the variate and factor should be restricted in the same way. RESTRICT can be used for example to limit the data to only one or two groups when the GROUPS factor has more than two levels.
Reference
Siegel, S. (1956). Nonparametric Statistics for the Behavioural Sciences. McGraw-Hill, New York.