STATISTICAL METHOD
McNemar's Test Analysis
Statistical Consulting for Paired Binary Outcomes
We apply McNemar's test within your study design, confirming the paired structure, working from the discordant pairs, using the exact version when counts are small, and reporting the paired odds ratio with its confidence interval.
No Commitment Required
Strictly Confidential
In-House PhD-Level Statisticians
Fixed Project Fee
Same-Day Response
METHOD OVERVIEW
What Is McNemar's Test?
McNemar’s test compares two paired proportions for a binary outcome, such as the same patients classified as positive or negative before and after an intervention, or matched case and control pairs classified on an exposure. The data form a 2×2 table of paired classifications, and only the discordant pairs, those that changed or disagreed, carry information about the difference, while concordant pairs do not. The test asks whether the two kinds of discordance are equally frequent, and the effect is reported as the odds ratio of discordant pairs, or as a difference in paired proportions, each with a confidence interval. OnlineSPSS, a specialist statistical consultancy for academic, clinical and professional research, provides McNemar’s test analysis within your study design, with the relevant checks, effect estimates, uncertainty measures, interpretation and publication-ready reporting.
WHEN TO ENGAGE
When Is McNemar's Test Appropriate?
McNemar's test fits a binary outcome observed twice on the same units or once in matched pairs, and these are the situations in which researchers most often ask us to apply it.
Pre-Post Binary Classification The same participants are classified as compliant or not, or positive or negative, before and after an intervention, and the change in proportion is the question.
Matched Case-Control Pairs Cases and controls are matched one to one and exposure is compared within each pair, so the matching must be respected in the analysis and in the reported estimate.
Two Tests on the Same Subjects Two diagnostic tests, or two raters, classify the same subjects as positive or negative, and the question is whether one calls positives more often than the other.
Reviewing a Completed Analysis A paired binary comparison was run as a chi-square test, or precision was judged from the total sample size, and a reviewer objected. Independent Statistical Review rechecks the test.
ANALYTICAL APPROACH
How We Apply McNemar's Test
Within the family of Comparative & Hypothesis Testing, McNemar's test is chosen only after the pairing, the binary outcome and the discordant counts have been examined.
Pairing and Binary Outcome We confirm that each pair is one unit with a binary response on each occasion or for each member. Treating pre-post data as independent groups discards the pairing and misstates the interval.
Discordant Pairs The statistic depends only on the two discordant cells, not on total sample size. We report both counts, since a large sample with few discordant pairs holds little information about change.
Exact or Asymptotic Test With few discordant pairs the chi-square approximation is unreliable, so we use the exact binomial version, and when a continuity correction is applied we state it in the methods.
Effect and Uncertainty We report the odds ratio of discordant pairs, the ratio of the two discordant counts, and the paired difference in proportions, each with an interval, and state which direction of change dominates.
DELIVERABLES
What You Receive
As part of our Quantitative Data Analysis service, the paired binary comparison is delivered with the estimates, checks and files needed to report and defend it.
Data & Variable Review Pair identifiers, the coding of the binary outcome at each occasion, participants missing one classification and duplicate records are reviewed before the paired table is built.
Method-Specific Checks The pairing, the number of discordant pairs and the direction of change are examined, with the exact test used where counts are small and Cochran's Q considered when a third occasion exists.
Statistical Results The paired 2x2 table with both discordant counts, the exact or asymptotic McNemar p-value, the odds ratio of discordant pairs, and the paired difference in proportions with intervals.
Publication-Ready Tables & Figures The paired table, proportions at each occasion and a figure of the change, formatted to APA 7, STROBE or the journal's requirements, ready to insert.
Interpretation The result is written as how often classifications changed in each direction and how large the imbalance is, within what the design supports, without attributing the change to an intervention lacking a control group.
Reproducible Analysis Files SPSS syntax, R scripts, Stata do-files or SAS code are provided where applicable, so every count and interval can be traced and rerun if the data change.
ALTERNATIVE METHODS
When Another Method May Be More Appropriate
We choose the method by design and outcome type. McNemar's test handles one paired 2x2 table, and these methods fit independent groups, adjustment or repeated binary data.
01
Chi-Square Test
When the two classifications come from separate, independent groups, not the same units, a chi-square test compares the proportions and McNemar's does not apply.
02
Logistic Regression
When matched sets contain several controls or the estimate needs covariate adjustment, conditional logistic regression extends the matched comparison.
03
Generalized Estimating Equations (GEE)
When a binary outcome is measured on three or more occasions, Cochran's Q tests for change and a GEE model estimates population-averaged effects with intervals.
04
Generalized Linear Mixed Models (GLMM)
With clustered or repeated binary responses and covariates, a mixed logistic model estimates subject-specific effects that a single paired table cannot.
CASE EXAMPLE
How We Work in Practice
An illustration of how a paired binary question moves from a planned test to a reportable, defensible result.
ILLUSTRATIVE EXAMPLE · HEALTH PLAN QUALITY RESEARCH · UNITED STATES
A health plan's quality improvement unit piloted an outreach campaign in two small primary care practices and tracked whether members with diabetes received a recommended eye exam in the year before and the year after.
Each member had one binary classification per year, so the data were paired, and before results were examined we specified McNemar’s test and rejected a chi-square test on the two yearly proportions because the same members appear in both. With a small pilot cohort, few members were expected to change status in either direction, so the exact binomial version was specified as primary, since the chi-square approximation would not be dependable. We reported both discordant counts, not just the marginal percentages, with the odds ratio of discordant pairs and the paired difference in proportions, each with its 95% confidence interval. Members without a second classification were counted and reported, and because there was no control group, the change was described as an association with the campaign period.
Outcome: The unit received the paired 2x2 table with both discordant counts, the exact McNemar p-value, the odds ratio of discordant pairs with its exact 95% confidence interval, the paired difference in proportions with a score-based 95% confidence interval, a methods paragraph, tables and the analysis syntax.
This example does not describe a real client or project. We never share details of actual client work, in line with the confidentiality we promise every researcher. This illustrative example is included to show the type, scope, and standard of work involved in this kind of analysis.
SOFTWARE
Statistical Software for Paired Binary Analysis
McNemar's tests and their exact versions are run in the statistical software researchers already use, with syntax or scripts provided where applicable.
RESEARCH DISCIPLINES
Paired Binary Outcomes Across Research Fields
McNemar's test appears wherever the same units or matched pairs are classified twice, each field with its own pairing designs and reporting conventions.
A Defined Process for Your Analysis
We review your dataset, research question and design before any work begins, so the scope, deliverables, timeline and fixed project fee are clear from the outset.
01
Share Your Research Materials
Send your dataset, research question, study design and any existing analysis plan or output. We will let you know if anything else is needed to assess the project.
02
Receive Your Assessment
Your statistically trained Research Coordinator reviews the project and confirms the required analysis, deliverables, timeline and fixed project price before work begins.
03
Analysis & Delivery
Once you confirm the scope, an in-house statistician completes the agreed analysis and delivers the outputs, interpretation and reporting files.
RESEARCHER VOICE
What Researchers Say
Feedback from a researcher who had results in hand but needed the paired structure checked and the reporting made defensible.
“I had results from McNemar's Test, but the interpretation still felt shaky because of the repeated or paired structure of the measurements. They checked the model, corrected the parts that needed attention, and made the final reporting much more defensible. The final calculation documented the assumptions clearly enough for the protocol and ethics submission.”
RESEARCH RESPONSIBILITY
Statistical Support Without Taking Over Your Research
We provide the statistical work for your paired comparison, and the study, its meaning and its authorship stay entirely with you.
Agreed Statistical Support We provide the agreed methodological, analytical and statistical reporting support for your paired binary analysis, within the scope confirmed before work begins.
No Intellectual Contribution OnlineSPSS claims no intellectual contribution to your research. Our work is statistical support, and authorship remains yours.
Your Research Decisions The research question, the definition of the binary outcome, interpretation and conclusions remain with you, and our statistical interpretation stays within what the counts and the design support.
Confidential Handling Research data and project details are handled confidentially and are not published. An NDA is available where required, and can be arranged before sensitive materials are shared.
FREQUENTLY ASKED QUESTIONS
Questions About McNemar's Test
Short answers to what researchers ask before a paired binary analysis, from pairing and exact tests to confidentiality and the assessment process.
Why can't I use a chi-square test on before and after data?
Because the same people appear in both columns, the observations are not independent, and a chi-square test of two proportions assumes they are. It would also ignore which individuals changed, which is exactly what carries the information. McNemar’s test works from the discordant pairs, those who changed in each direction, and respects the pairing, so the interval and the p-value answer the question about change.
When should I use the exact McNemar's test?
Use the exact binomial version when the number of discordant pairs is small, commonly fewer than about 25, because the chi-square approximation is then unreliable. The exact test conditions on the discordant pairs and is valid at any count, so many analysts report it routinely. We state which version was used and, where a continuity correction applies, say so in the methods.
Is McNemar's test or a mixed model better for my design?
McNemar’s test fits one paired 2×2 table: two occasions, or matched pairs, without covariates. With three or more occasions, Cochran’s Q extends it, and with covariates, clustering or missing occasions, GEE or a mixed logistic model is preferable. These estimate different quantities, population-averaged versus subject-specific, so we state which one answers your question.
Can you review an analysis that has already been completed?
Yes, we can review a completed McNemar analysis before submission or a response to reviewers. We check that the pairing was used, how many pairs were discordant, whether the exact version was needed, the odds ratio and its interval, and the reporting, and confirm what stands or needs to change.
How do you protect my dataset and research confidentiality?
Your dataset, output files and any protocol or analysis plan are handled confidentially, and project information is not published. An NDA is available where required and can be arranged before sensitive materials are shared. Read more about confidentiality and data security.
What happens when I request an assessment, and how long does it take?
You share your research question, design and relevant materials, and a statistically trained Research Coordinator reviews the request and responds the same day. The analysis, deliverables, timeline and one fixed project fee are then confirmed before any work begins, so the timeline follows from the agreed scope.
Still have a question? Find more answers in our full FAQ.
NEXT STEP
Need Support With
McNemar's Test?
Share your research question, study design and data. We assess whether the test fits your paired outcome and confirm the approach before any work begins.
No Commitment Required
Strictly Confidential
Fixed Project Fee
In-House PhD-Level Statisticians
Same-Day Response
Serving Researchers Since 2014