WILCOXON Subcommand (NPAR TESTS command)
NPAR TESTS WILCOXON=varlist [WITH varlist [(PAIRED)] ]
WILCOXON
tests whether the distribution of two paired variables in two related
samples is the same. This test takes into account the magnitude of the differences between two
paired variables. The output includes a Ranks table, showing, for each pair, the number of valid
cases, positive and negative differences, their respective mean and sum of ranks, and the number of
ties. The output also includes a Test Statistics table, showing Z and probability of
Z.
Syntax
- The minimum specification is a list of two variables.
- If keyword
WITH
is not specified, each variable is paired with every other variable in the list. - If keyword
WITH
is specified, each variable beforeWITH
is paired with each variable afterWITH
. IfPAIRED
is also specified, the first variable beforeWITH
is paired with the first variable afterWITH
, the second variable beforeWITH
is paired with the second variable afterWITH
, and so on.PAIRED
cannot be specified withoutWITH
. - With
PAIRED
, the number of variables that are specified before and afterWITH
must be the same.PAIRED
must be specified in parentheses after the second variable list.
Operations
- The differences between the pair of variables are counted, the absolute differences are ranked, the positive and negative ranks are summed, and the test statistic Z is computed from the positive and negative rank sums.
- Under the null hypothesis for large sample sizes, Z is approximately normally distributed with a mean of 0 and a variance of 1.
Example
NPAR TESTS WILCOXON=A B WITH C D (PAIRED).
- This example pairs A with C and B with D. If
PAIRED
were not specified, the example would also pair A with D and B with C.