Atlas
statminds
Categorical GLM (Paired Proportion Model)The underlying model family class (e.g. GLM, linear model, categorical matrix, log-linear).Parametric ReferenceStatistical methods that assume a specific probability distribution family (typically normal).12-stage workflow

McNemar's Test

The engine for Paired Categorical Discovery. This model audits the change in a binary outcome within the same participants (e.g., Pre vs. Post), revealing the specific direction of recovery or decline.

Model familyCategorical GLM (Paired Proportion Model)
Hypothesischange/difference
AliasesMcNemar's Chi-Square · Paired Proportion Test · Test of Marginal Homogeneity
G1
Categorical Shift Audit
Determine if an intervention causes a significant mean shift in binary status within the same group over time.
G2
Internal Precision Discovery
Isolate the 'Internal Signal' by ignoring stable participants and focusing only on those who 'flipped' status.
G3
Proportional Symmetry Audit
Verify if the rate of improvement significantly exceeds the rate of decline in a paired longitudinal design.
1

What is it?

McNemar's Test compares paired proportions in a single group measured twice (e.g. pre-test vs. post-test nominal states).

2

When to use it

  • Matched Pairs: Repeated measurements on the same participants.
  • Binary Nominal Outcome: Yes/No state before and after intervention.
3

Core Idea

Concordant pairs (agreeing before and after, i.e., Yes-Yes and No-No) provide no information on state shifts. Thus, we focus purely on the discordant cells:

X2 = (|b - c| - 1)2 / (b + c)

If the count of shifts from Yes to No (b) is roughly equal to shifts from No to Yes (c), the statistic is small. If one direction dominates, the statistic rises.

4

Hypotheses

H0: The marginal probabilities are equal (no net shift in population states).
Ha: Marginal probabilities differ (significant direction of shift).
5

How it works

  1. Build the 2x2 pre/post crosstab.
  2. Extract counts of discordant cells: b (Yes-No) and c (No-Yes).
  3. Apply Yates' continuity correction: subtract 1 from absolute difference.
  4. Compute p-value against df = 1.
6

Assumptions

📊 Adequate Discordants: Discordant count (b + c) should be >= 10.
👤 Paired Design: Each respondent is observed exactly twice.
7

Effect Size

Commonly reported via the odds ratio of the discordant cells: OR_discordant = b / c. A value of 1.0 indicates perfect symmetry.

8

Quick Example

Pre \ PostPost YesPost No
Pre Yes4012 (b)
Pre No32 (c)26
Interactive Sandbox

McNemar's Live Laboratory

Vary discordant cells b and c to observe the directional flow shifts and the Yates-corrected chi-square.

Cell a (Yes to Yes)40
Cell b (Yes to No)12
Cell c (No to Yes)32
Cell d (No to No)26
Paired Discordant state transitions (Yes/No)Amber arrow represents b transition, Green arrow represents c transition
PRE STATEYes: 52No: 58POST STATEYes: 72No: 38b=12c=32
Calculations Output
MetricValue
Total Pairs (N)110
Corrected X2 (Yates)8.2045
Uncorrected X29.0909
Discordant Odds Ratio (b/c)0.3750
p-value (corrected)0.0042
Shift Verdict

Significant Shift The proportion of discordant changes is significantly asymmetric (p = 0.0042). A systematic directional state shift has occurred.

The 12-Stage Precision Workflow
01Status Symmetry
Hypotheses
We test the null of 'Equal Discordance' (flips from 0 to 1 = flips from 1 to 0) against the discovery of a directional status shift.
02Truly Paired
Assumptions
The ultimate prerequisite: each pair of observations must belong to the same participant or a perfectly matched control.
03The Discordant Count
Diagnostics
Checking the 'Switchers' (Cells B and C). If the total number of people who changed status is < 25, the model requires an 'Exact' correction.
04focus
Auditing FlowMotion participants' 'Pain-Free' status (Yes/No) at Baseline vs. 12-week follow-up to measure pure internal recovery.
05Cochran's Q Pivot
Alternatives
Knowing when to switch to Cochran’s Q if you are auditing more than two timepoints (e.g., Baseline vs. 6wks vs. 12wks).
06The Discordance Strike
Significance
Calculating the χ² based only on the people who changed status—a precision strike on the internal movement of the categorical data.
07Odds Ratio (OR)
Effect Size
Interpreting the 'Ratio of Change'—e.g., 'Participants were 3 times more likely to move to Pain-Free than they were to move back to Pain.'
08The Change Power
Sample Size
Calculating the N based on the expected 'Switch Rate'—the true currency of paired categorical power.
09The Shift Narrative
Reporting
Reporting the percentages clearly: 'There was a significant status shift, χ²(1) = X.XX, p = .XXX, with 40% recovering and only 5% declining.'
10McNemar.Test Logic
Software
Executing 'mcnemar.test' on a 2x2 matrix, ensuring the 'Correct = TRUE' flag is used for smaller discordant counts.
11focus
The fatal error of using standard Chi-Square on paired data—which ignores the internal correlation and dangerously invalidates the discovery.
12focus
Tracing the model back to Quinn McNemar (1947) and the foundational evolution of matched-pair categorical forensics.
01Hypothesis test logic

Hypotheses

Pragmatic null and alternative hypotheses defined in mathematical notation.

A hypothesis is a question sharpened to a point. Ambiguity is the enemy of inference.
Logic Core
Null · H₀

H₀: p₁₂ = p₂₁ (proportions of discordant pairs are equal; no systematic change)

Alternative · Hₐ

Hₐ: p₁₂ ≠ p₂₁ (systematic change exists; can also test p₁₂ > p₂₁ or p₁₂ < p₂₁)

Why it matters change/difference

Tests whether marginal proportions are equal in paired 2×2 table. Focuses exclusively on discordant pairs (cells b and c), ignoring concordant pairs (cells a and d). For k×k tables, use Bowker's test (symmetry) or Stuart-Maxwell test (marginal homogeneity).

02Model diagnostics

Assumptions

The core mathematical criteria needed to ensure that statistical testing remains unbiased and valid.

Build your analysis on rock, not sand. Verify the mathematical foundation before building the model.
Integrity Shield
6
Assumptions
0
Critical / High Severity
How to check
Quick
Review study design: Is each subject measured twice (before/after)? Are subjects matched in pairs (e.g., twins, siblings, case-control matched on confounders)? Verify that table rows and columns represent same subjects or matched pairs, not independent groups.
Rigorous
Check data structure: each row should represent a pair (Subject_ID, Time1_outcome, Time2_outcome) or (Matched_ID, Subject1_outcome, Subject2_outcome). Verify pairing variable exists and is correctly specified. Count number of pairs equals number of rows in original data.
If violated
If data are actually unpaired (independent samples), use appropriate test for independent groups: chi-square test of independence for large samples, Fisher's exact test for small samples. Do NOT use McNemar's test for unpaired data. Alternatives: For unpaired binary data: chi-square independence test, Fisher's exact test (small n), logistic regression. For paired continuous data: paired t-test or Wilcoxon signed-rank test. For ordinal paired data: Wilcoxon signed-rank test.
chi square independencefisher exactwilcoxon signed ranklogistic regression
How to check
Quick
Verify outcome has exactly 2 categories at each measurement. Check contingency table dimensions: must be 2×2. Ensure same outcome scale used at both times (e.g., same diagnostic threshold, same definition of 'success').
Rigorous
Examine frequency distribution of outcome at Time1 and Time2. Confirm no additional categories (e.g., 'unknown', 'partial response'). If ordinal (e.g., 'improved', 'no change', 'worse'), consider whether dichotomization is substantively meaningful or use Stuart-Maxwell test.
If violated
If outcome has >2 categories but is ordinal: dichotomize based on meaningful clinical/theoretical threshold (e.g., 'improved/stable' vs 'worse'), but acknowledge information loss. Document dichotomization rationale a priori. Alternatives: For k×k paired tables: Bowker's test of symmetry (tests if off-diagonal cells mirror each other), Stuart-Maxwell test (marginal homogeneity for k>2 categories), or ordinal extensions like marginal homogeneity models. For continuous paired outcomes: paired t-test or Wilcoxon signed-rank test.
stuart maxwellwilcoxon signed rankbowker
How to check
Quick
Review sampling design: Are pairs randomly sampled from population? Check for hierarchical structure (pairs within clusters). Verify no time series autocorrelation between consecutive pairs. Ensure pairs are not systematically related (e.g., siblings where multiple sibling pairs from same family).
Rigorous
Calculate intraclass correlation (ICC) for pairs nested within clusters. For longitudinal repeated measures, check that pairs don't have temporal dependencies. Plot pairs by collection order to detect systematic patterns.
If violated
If pairs are clustered (e.g., pairs within clinics), use mixed-effects logistic regression with random intercept for cluster, or GEE with appropriate correlation structure. If multiple pairs per subject (e.g., left eye/right eye repeated over time), account for both within-subject and within-time correlation. Alternatives: Mixed-effects models with crossed or nested random effects for clustered paired data. Conditional logistic regression for matched case-control. GEE (generalized estimating equations) for correlated binary outcomes. McNemar-Bowker test extensions for clustered data.
mcnemarbowkerlogistic regressiongee
How to check
Quick
Create 2×2 contingency table for paired data. Count discordant pairs: b (Time1=No, Time2=Yes) + c (Time1=Yes, Time2=No). If b+c < 10, chi-square approximation may be inaccurate. If b+c < 5, definitely use exact test.
Rigorous
Calculate b+c. For borderline cases (b+c = 8-12), compare standard McNemar p-value with exact binomial p-value to assess approximation quality. Conduct simulation: generate data under H₀ with observed b+c, check if Type I error rate ≈ α.
If violated
If b+c < 10: use exact McNemar test (exact binomial test on discordant pairs). In R: binom.test(b, b+c, p=0.5) or exact2x2::mcnemar.exact(). In Python: statsmodels with method='exact'. Apply continuity correction for b+c between 10-25. Alternatives: Exact binomial test for small b+c. Mid-p correction reduces conservatism. For very small samples (b+c < 5), consider reporting descriptive statistics only with appropriate caveats about low power.
How to check
Quick
Conceptual assumption—no empirical check needed. Understand that McNemar's test conditions on marginal totals (row sums = column sums) and tests symmetry of off-diagonal cells. This is inherent to the paired design.
Rigorous
Compare McNemar's test with alternative paired tests (e.g., generalized linear mixed model for binary repeated measures). If results differ substantially, investigate whether marginal homogeneity assumption is appropriate for research question.
If violated
This is a structural assumption of the test, not usually 'violated' in practice. If research question requires different hypothesis (e.g., testing variance of change), use different approach. Alternatives: If marginal homogeneity is not the right framework: use repeated measures logistic regression, GEE with independent working correlation, or Cochran's Q test (extension to >2 time points).
logistic regressiongee
How to check
Quick
Calculate proportion missing at each time point. Compare baseline characteristics (Time1 outcome, covariates) between complete pairs vs. incomplete pairs. If those with missing Time2 differ systematically from complete cases, MCAR assumption violated.
Rigorous
Logistic regression: predict missingness from baseline variables and Time1 outcome. If significant predictors exist, data are not MCAR. Conduct sensitivity analysis: impute missing values using multiple imputation, rerun McNemar's test, compare to complete-case results.
If violated
Multiple imputation for binary outcomes in paired data (specialized methods required). Inverse probability weighting to account for informative missingness. Sensitivity analysis with best-case/worst-case scenarios for missing outcomes. Alternatives: Generalized estimating equations (GEE) can handle some missing data patterns. Mixed-effects logistic regression with missing at random (MAR) assumption. Bound the effect under different missingness scenarios.
logistic regressiongee
03Residual Forensics

Diagnostics

Checking residual plots and indices to examine model deviations and ensure standard error integrity.

Trust, but verify. The outliers often hold more truth than the averages.
System Health
Essential checks
  1. Create 2×2 contingency table with before/after or matched pair data
  2. Count discordant pairs (b+c) to verify adequacy (≥10 for chi-square, ≥25 for accurate approximation)
  3. Check if continuity correction is needed (when b+c < 25)
  4. Calculate odds ratio for discordant pairs: OR = b/c
  5. Verify pairing structure is correct (same n for both measurements)
Recommended checks
  1. Visualize change patterns with before/after scatter plot or alluvial diagram
  2. Calculate proportion of discordant vs concordant pairs
  3. Plot distribution of changes (improvement vs deterioration)
  4. Compare McNemar's test with exact binomial test for sensitivity
  5. Calculate effect sizes: OR for discordant pairs, risk difference, phi coefficient
  6. Assess symmetry of discordant pairs (b vs c)
  7. Examine concordant pairs for context (not used in test but informative)
  8. Check for clustered pairing if study design suggests nesting
  9. Sensitivity analysis excluding ties if continuous outcome was dichotomized
04Live Instances

Applied Minds

Review concrete study examples, data layout guidelines, and copy executable syntax scripts.

Theory is the map. Practice is the terrain. Simulation bridges the gap.
Applied Wisdom
Example 01

CBT for Anxiety (n=50)

A clinical trial evaluating cognitive behavioral therapy (CBT) for anxiety disorder. Participants (n=50) are assessed for clinically significant anxiety before and after 12-week intervention. McNemar's test assesses whether anxiety prevalence changed significantly, focusing on discordant pairs (those who improved or worsened). We demonstrate standard McNemar test with continuity correction, calculation of odds ratio for discordant pairs, and comprehensive visualizations.

05Tactical Pivots

Alternatives

Structured fallback pathways for choosing alternative tests when normality or slopes requirements fail.

When the path is blocked, pivot. Rigor is not rigidity; it is the intelligent adaptation to reality.
Adaptive Strategy
Measurement Precision Ladder Ideal · Paired Binary
Ratio / Interval
Consider Paired T-Test. Binary conversion of longitudinal scales destroys the 'Recovery Magnitude' signal.
Data Flattening
Ordinal Pairs
Pivot to Stuart-Maxwell to model shifts across multiple ranked categorical stages.
Threshold Loss
Binary Pairs
Maintain McNemar logic. The definitive engine for auditing binary 'Status Flips' over time.
Peak Signal
Temporal Trajectory Audit Longitudinal Paired Status
Paired Flips
Exactly 2 stages.
Stay with McNemar. Isolate the drivers of internal categorical change.
Multi-Temporal
3+ timepoints.
Pivot to Cochran's Q Test to audit the consistency of binary success across the study window.
Continuous Time
Survival trajectories.
Pivot to Time-Dependent Cox Modeling to model the hazard of a status-flip occurring.
Adaptive Technical Safeguards · adaptive safeguards
low discordant pairs
  • Exact McNemar Strike — Mandatory use of the binomial exact p-value when (b+c) < 25.
  • Yates Continuity Correction — Apply the standard correction to protect alpha in moderate samples.
unpaired data detected
  • Chi-Square Independence — Return to standard contingency math if observations are unrelated.
multi category shift
  • Bowker Symmetry Audit — Test if the overall 3x3 or higher grid is non-randomly asymmetric.
06Adjusted Comparisons

Post-hoc

Group mean comparisons and correction controls (e.g. Tukey HSD, Bonferroni) to protect against Family-Wise Error Rates.

The omnibus test opens the door; post-hoc analysis explores the room.
Forensic Detail
Adjusted Comparisons
  • Calculate odds ratio for discordant pairs with exact CI
  • Compare with exact McNemar test for small samples
  • Use mid-p McNemar for less conservative inference
  • Extend to Stuart-Maxwell for more than 2 categories
  • Compare with conditional logistic regression
Interpretation Guidelines

McNemar's test compares paired proportions (2 conditions). Post-hoc tests are not applicable.

07Standardized scale impact

Effect Size

Understanding effect sizes (e.g., Cohen's d, Partial Eta-Squared) and clinical impact benchmarks.

Significance is noise. Magnitude is the signal. Measure the impact, not just the probability.
Impact Magnitude
formula

OR = b/c where b = number of (0→1) changes, c = number of (1→0) changes

interpretation

OR=1: equal changes in both directions (no net change); OR>1: more (0→1) than (1→0); OR<1: more (1→0) than (0→1)

note

Directly related to McNemar statistic. OR significantly different from 1 implies significant McNemar test. Confidence intervals for OR use log transformation.

confidence intervals

Calculate 95% CI using exact binomial method or asymptotic log transformation: exp(log(OR) ± 1.96*sqrt(1/b + 1/c))

formula

RD = (b - c) / n where n is total number of pairs

interpretation

Proportion of pairs showing net change. RD=0 under H₀. RD>0: net increase; RD<0: net decrease.

note

More interpretable than OR for most audiences. Directly conveys magnitude of change in outcome prevalence.

confidence intervals

Use Wilson score interval or exact binomial method for (b+c) trials with b successes

small

0.1

medium

0.3

large

0.5

formula

φ = (ad - bc) / sqrt((a+b)(c+d)(a+c)(b+d)) for 2×2 table

note

Measures association strength, ranges -1 to +1. Analogous to correlation for paired binary data.

formula

Proportion of discordant pairs = (b+c) / n

interpretation

Indicates how much change occurred (regardless of direction). High value means substantial change; low value means most pairs concordant (stable).

note

Useful for understanding how many pairs actually changed, which determines power.

formula

κ = (p_o - p_e) / (1 - p_e) where p_o = (a+d)/n, p_e = expected agreement by chance

interpretation

κ<0: less than chance agreement; 0-0.20: slight; 0.21-0.40: fair; 0.41-0.60: moderate; 0.61-0.80: substantial; 0.81-1: almost perfect

note

Measures agreement between two measurements. High kappa means little change (most pairs concordant). Inverse relationship with McNemar statistic.

Recommended Metric: Odds ratio for discordant pairs with 95% CI (primary); also report risk difference and proportion of discordant pairs for interpretability
Small
0.2
Medium
0.5
Large
0.8
0.50
Odds ratio for discordant pairs with 95% CI (primary); also report risk difference and proportion of discordant pairs for interpretability
Recommended Measure
5
Available Metrics
ReportUse Odds ratio for discordant pairs with 95% CI (primary); also report risk difference and proportion of discordant pairs for interpretability to represent clinical impact magnitude.
08Statistical Power

Sample Size

Guidelines for minimum sample requirements and power analysis parameters.

An underpowered study is an ethical failure. Respect the data by collecting enough of it.
Power Protocol
Floor Requirements

The 'Switch-Density' Minimum: A minimum of 10-15 'Discordant Pairs' (participants who changed status) is required to ensure the McNemar strike reaches statistical authority.

Effect SizeParametersRequired n
Small EffectOR = 1.5 (Small), P_disc = 0.2n ≈ 600 total pairs
Medium EffectOR = 2.5 (Medium), P_disc = 0.2n ≈ 120 total pairs
Large EffectOR = 4.0 (Large), P_disc = 0.2n ≈ 50 total pairs
Key considerations

The 'Stability Paradox': If every participant stays the same (everyone recovers or everyone stays ill), McNemar's test has zero power regardless of N. Recruit for 'Change Potential'.

G*Power StrategyBenchmark: Exact → Proportions: Inequality, two dependent groups (McNemar). Parameters: Odds Ratio (OR), Discordant Proportion (P_disc), α = .05, Power = .80. Note: Power is dictated by the number of people who CHANGE, not the total N.
09APA narrative blueprint

Reporting

How to compile statistical results into publication prose matching APA and journal style guides.

Data does not speak for itself. It requires a translator. Be clear, be precise, be honest.
Narrative Arc
Worked APA paragraph example
McNemar's test was performed to assess the effectiveness of a cognitive behavioral therapy intervention in reducing anxiety symptoms. Participants (n=50) were classified as having clinically significant anxiety (yes/no) before and after 12 weeks of treatment. Of 50 paired observations, 22 were discordant: 18 participants improved (anxious at baseline → not anxious post-treatment) and 4 worsened (not anxious → anxious). The remaining 28 participants showed no change (16 remained anxious, 12 remained non-anxious throughout). McNemar's test with continuity correction indicated a statistically significant reduction in anxiety prevalence (χ²(1)=7.36, p=.007). The odds ratio for discordant pairs was 4.50 (95% CI [1.42, 14.23]), indicating that participants were 4.5 times more likely to improve than worsen. The net proportion showing improvement was 0.36 - 0.08 = 0.28 (28%), representing a clinically meaningful reduction in anxiety prevalence from 68% to 40%.
Reusable template

McNemar's test was conducted to evaluate change in outcome from Time 1/Condition 1 to Time 2/Condition 2 among n=XX paired observations. Of the XX pairs, XX were discordant (XX showed improvement 0→1, XX showed deterioration 1→0), and XX were concordant. The test revealed a significant / showed no significant change in outcome prevalence (χ²(1)=X.XX, p=.XXX, with / without continuity correction). The odds ratio for discordant pairs was OR=X.XX (95% CI X.XX, X.XX), indicating interpretation. If significant: The proportion showing improvement was X.XX compared to X.XX showing deterioration, yielding a net change of X.XX (XX%).

10Exhibit Builder

Manuscript Lab

Copy standard summary tables and forensic reporting grids to outline analysis details.

Table 1: McNemar's Test for Shift in Diagnosis Post-Treatment
Pre-TreatmentPost: AbsentPost: Presentχ²pOdds Ratio
Present42 (Shift Out)8 (Stay)32.4< .0010.19
Absent45 (Stay)5 (Shift In)
Note. N = 100 subjects measured twice. Focus on 'Discordant Pairs' (Off-diagonal).
42 vs 5Powerful Treatment Vector. 42 people lost the diagnosis while only 5 gained it, proving a massive net benefit.
Header glossary

The Asymmetry Audit. Compares the number of people who changed from Present->Absent vs those who changed from Absent->Present.

The 'Switchers'. Only those who changed status contribute to the test's power.

11Algorithmic Logic

Command Center

Syntax libraries and function parameters for executing calculations in stats packages.

Code is the modern laboratory. Clean execution ensures reproducible discovery.
Execution Engine
# 1. Execute McNemar's Test
mcnemar.test(table(df$pre, df$post))
Library stack
R
stats
Python
statsmodels.stats.contingency_tables
Elite Forensic Strike

McNemar's is the 'Categorical Paired T-test'. It ignores everyone who stayed the same and only audits the 'Switchers'.

# Generate Narrative
report::report(mcnemar.test(table))
12The Over-adjustment Trap

Common Mistakes

Analytical caveats and corrections to maintain modeling integrity.

Wisdom is learning from the failures of others. Anticipate the error before it occurs.
Defensive Logic
Why it's wrong
The most common and serious error. Paired data have within-pair correlation that must be accounted for. Using chi-square independence test ignores pairing, treats 2n observations as independent when they are not, violates independence assumption, and loses substantial statistical power. Type I error rates can also be affected. Example: Before/after treatment data analyzed as if two separate groups.
The correction
Always use McNemar's test for paired binary data. Verify pairing structure: same subjects measured twice (repeated measures) or matched pairs (e.g., twins, matched case-control). Create 2×2 table with paired structure: rows represent Time1/Condition1, columns represent Time2/Condition2, each cell represents count of pairs in that combination. In R: mcnemar.test(table); in Python: statsmodels.stats.contingency_tables.mcnemar(table). Report: 'McNemar's test was used to account for paired nature of data (n=XX pairs, χ²=XX, p=.XXX).'
Why it's wrong
McNemar's test depends entirely on discordant pairs (b and c); concordant pairs (a and d) provide no information for the test. Many analysts run McNemar's test without examining b+c. If b+c is very small (<10), chi-square approximation is inaccurate. If most pairs are concordant (little change occurred), test has low power even with large n.
The correction
Always report: 'Of n=XX pairs, XX were discordant (XX improved [0→1], XX worsened [1→0]) and XX were concordant.' Check b+c: if <10, use exact test; if 10-25, apply continuity correction; if >25, standard chi-square is appropriate. Calculate proportion discordant: (b+c)/n. If <0.10 (very few changes), acknowledge low power and consider whether test is appropriate. Example: 'McNemar's test was conducted on 50 pairs, with 22 discordant pairs (b=18, c=4), yielding sufficient power to detect change.'
Why it's wrong
McNemar's test is specifically for 2×2 paired tables. Bowker's test generalizes to k×k tables to test symmetry (all off-diagonal cells). Stuart-Maxwell test also for k×k but tests marginal homogeneity (different hypothesis). Cochran's Q extends McNemar to >2 time points. Using wrong test leads to incorrect hypothesis being tested or invalid results.
The correction
Decision tree: (1) Is outcome binary? If yes, continue; if no (ordinal/multi-category), consider Stuart-Maxwell or Bowker. (2) Are there 2 measurement times? If yes, use McNemar; if >2 times, use Cochran's Q. (3) Is pairing structure simple (1-to-1)? If yes, standard McNemar; if complex (clustered), use mixed models. Example: 'Data involved 3-category outcome (improved/stable/worse); Stuart-Maxwell test for marginal homogeneity was used instead of McNemar's test.'
Why it's wrong
McNemar statistic follows chi-square distribution asymptotically (large sample). With small b+c, this approximation is poor, leading to anticonservative p-values (Type I error inflation). Continuity correction improves approximation for moderate b+c (10-25), but exact test is preferred for b+c<10. Many software defaults to standard test without checking b+c.
The correction
Decision rule: (1) If b+c < 10: use exact McNemar test (exact binomial on b successes in b+c trials with p=0.5). (2) If 10 ≤ b+c < 25: use continuity correction. (3) If b+c ≥ 25: standard chi-square is accurate. In R: mcnemar.test(table, correct=TRUE) applies correction; exact2x2::mcnemar.exact(table) for exact test. In Python: mcnemar(table, exact=True). Report which method used: 'McNemar's exact test (b+c=8) yielded p=.XXX' or 'McNemar's test with continuity correction (b+c=18) yielded χ²=X.XX, p=.XXX.'
Why it's wrong
P-value alone does not quantify magnitude or clinical significance of change. A significant McNemar test tells you change is not due to chance, but not how large the change is. With large samples, even trivial changes (e.g., OR=1.1) can be statistically significant. Conversely, meaningful changes may be non-significant with small samples.
The correction
Always calculate and report: (1) Odds ratio for discordant pairs: OR = b/c with 95% CI using exp(log(OR) ± 1.96*sqrt(1/b + 1/c)). (2) Risk difference: (proportion Time2=Yes) - (proportion Time1=Yes) = (a+b-a-c)/n = (b-c)/n. (3) Proportions at each time: Time1: (a+c)/n, Time2: (a+b)/n. Example reporting: 'Symptom prevalence decreased from 68% to 40% (RD=-28%, 95% CI [-45%, -11%]). Among discordant pairs, OR=4.5 (95% CI [1.4, 14.2]), indicating participants were 4.5× more likely to improve than worsen.'
Why it's wrong
McNemar's test is equivalent to unadjusted conditional logistic regression for matched pairs. When matching variables or other covariates need to be controlled, simple McNemar's test is insufficient. This is common in case-control studies matched on age/sex/etc., where investigators want to test exposure association while adjusting for additional confounders.
The correction
For matched case-control with covariates, use conditional logistic regression (accounts for matching and adjusts for covariates). In R: clogit(outcome ~ exposure + covariate + strata(matched_pair_id), data). For simple matched pairs with no covariates to adjust, McNemar's test is appropriate and equivalent to conditional logistic regression with just the exposure variable. Report: 'Conditional logistic regression accounting for matched pairs and adjusting for [covariates] was used; OR=X.XX (95% CI [X.XX, X.XX]), p=.XXX.'
Why it's wrong
Dichotomization of continuous or ordinal variables loses information, reduces power, and can create misleading results if cut-point is arbitrary or data-driven. Common example: converting Likert scale response ('strongly disagree' to 'strongly agree') into binary 'agree/disagree'. Different cut-points can yield different conclusions (p-hacking risk).
The correction
Only dichotomize if: (1) Cut-point is clinically meaningful and defined a priori (e.g., diagnostic threshold, standard criterion like BMI≥30), (2) theoretical justification exists, (3) alternative is not feasible. For ordinal paired data (k>2 categories), use Stuart-Maxwell test for marginal homogeneity or Wilcoxon signed-rank test. For continuous paired data, use paired t-test or Wilcoxon signed-rank. If dichotomization necessary, report sensitivity analysis with alternative cut-points. Example: 'Continuous pain score (0-10) was dichotomized at clinically meaningful threshold of ≥5 (moderate-severe pain) per Smith et al. (2020). Sensitivity analysis using threshold=4 yielded consistent results (p=.XXX vs p=.XXX).'
Why it's wrong
McNemar's test detects systematic change (marginal homogeneity), not agreement or reliability. A significant McNemar test means proportions differ between measurements (systematic shift). High agreement (measured by kappa statistic) and significant McNemar test are actually inversely related: perfect agreement implies no change (non-significant McNemar). This confusion is common when McNemar is incorrectly used for inter-rater reliability studies.
The correction
Distinguish research questions: (1) Is there systematic change/bias between measurements? → McNemar's test. (2) Do measurements agree/are they reliable? → Kappa statistic, Cohen's kappa, intraclass correlation. For reliability/agreement studies with paired binary ratings, report both McNemar (tests systematic disagreement) and kappa (measures overall agreement). Example: 'McNemar's test was non-significant (p=.45), indicating no systematic bias between Rater1 and Rater2. Kappa=0.78 indicated substantial agreement.' vs 'McNemar's test was significant (p=.002), indicating systematic bias (Rater1 classified 30% as positive vs Rater2 at 50%). Kappa=0.65 indicated only moderate agreement despite correlation.'
13Academic Lineage

References

Scholarly lineage and citation keys grounding the statistical framework.

We stand on the shoulders of giants. Honor the source of the method.
Academic Lineage
[1]
[2]
[3]
[4]
[5]
[6]
If everyone stays the same, the model has nothing to say. Respect the 'Switchers', for they are the only ones who carry the signal of discovery in a paired world.
The Interpretive Rigor Directive
statminds · McNemar'sMind reference · v2.2 · updated 2026-01-1715 of 15 sections