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 before WITH is paired with each variable after WITH. If PAIRED is also specified, the first variable before WITH is paired with the first variable after WITH, the second variable before WITH is paired with the second variable after WITH, and so on. PAIRED cannot be specified without WITH.
  • With PAIRED, the number of variables that are specified before and after WITH 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.