StatLabStudent EditionUser guideGalleryFeaturesAbout

Wilcoxon signed-rank, sign and McNemar tests

Compares two related measurements (before/after, matched pairs). Wilcoxon uses the size and sign of the differences, the sign test only their sign, McNemar compares paired yes/no outcomes.

Menu: Analyze → Nonparametric Tests → Legacy Dialogs → 2 Related Samples…

When should I use it?

What are the assumptions?

How do I run it in StatLab?

  1. Put the first variables of each pair in 'Variable 1' and the second ones, in the same order, in 'Variable 2'.
  2. Tick the tests wanted.

How do I read the output?

OutputMeaning
Negative / Positive Ranks / TiesCases where the second value is lower / higher / equal.
Z, Asymp. Sig.Based on the smaller rank sum (footnote).
McNemar Exact Sig.Binomial test on the discordant pairs.

Worked example

On the practice survey dataset (File → Sample dataset), this command — which the dialog's Paste button also produces — runs the procedure:

PROC np2Related /first=(score age) /second=(pre post) /wilcoxon=YES /sign=NO /mcnemar=NO /exact=NO.

Output tables: Ranks · Test Statistics.

How would I report it in APA style?

A Wilcoxon signed-rank test for Pre-test score - Wellbeing score gave Z = −10.48, p < .001, r = .86. A Wilcoxon signed-rank test for Post-test score - Age (years) gave Z = −7.08, p < .001, r = .58.

Computed by StatLab's validated procedure code when this page was built. The example only illustrates the steps; choose variables that fit your own research question.

What are common mistakes?

Open StatLab   All guide topics