Which Test?

Draft: This page has not been reviewed by a statistician yet. Use it as a starting point and check important choices with a statistician.

Friedman test

Compares a skewed measurement or an ordered score across three or more conditions in the same patients, using ranks.

Clinical example

A pain score from 0 to 10 recorded in the same patients under three different analgesic regimens in a crossover study.

When to use it

  • The same patients are measured three or more times, or under three or more conditions.
  • The outcome is an ordered score or a skewed measurement.
  • Every patient has a value for every condition, and you don't need to adjust for other variables.

Assumptions to check

Related groups

The same patients, or matched sets, appear in every condition.

Complete data

Every patient needs a value in every condition. The Skillings–Mack test copes with missing values.

No normality needed

The test uses ranks. Report the median and IQR at each condition.

Check first

  • With covariates or missing visits, use a GLMM or GEE instead

What to report

  • Median (IQR) at each condition

Common mistakes

Kruskal–Wallis, which assumes independent groups

Alternatives

If your situation is…Use
The outcome is roughly normalLinear mixed model
The outcome is yes or no in the same patientsCochran's Q test
You need covariates, or visits are missingGEE and mixed-effects logistic regression

In your software

R
# R (long format: one row per patient and condition)
friedman.test(pain ~ regimen | patient_id, data = d_long)
SPSS
* Wide format: one variable per condition.
NPTESTS
  /RELATED TEST (pain_a pain_b pain_c) FRIEDMAN(COMPARE=PAIRWISE).

Sources