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.

Cochran's Q test

Compares a yes/no outcome across three or more conditions in the same patients, as an extension of McNemar's test.

Clinical example

Whether the proportion of patients who tolerate a drug differs between three dose levels, each given to the same patients.

When to use it

  • The outcome is yes or no and measured under three or more conditions in the same patients.
  • Every patient has a value for every condition.
  • 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

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

Check first

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

What to report

  • Proportion at each condition

Alternatives

If your situation is…Use
Only two related groupsMcNemar 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; outcome 0/1)
library(rstatix)
cochran_qtest(d_long, response ~ condition | patient_id)
SPSS
* Wide format: one 0/1 variable per condition.
NPAR TESTS
  /COCHRAN=dose_a dose_b dose_c.

Sources