Skip to main content
Top
Published in: BMC Medical Research Methodology 1/2013

Open Access 01-12-2013 | Research article

The McNemar test for binary matched-pairs data: mid-p and asymptotic are better than exact conditional

Authors: Morten W Fagerland, Stian Lydersen, Petter Laake

Published in: BMC Medical Research Methodology | Issue 1/2013

Login to get access

Abstract

Background

Statistical methods that use the mid-p approach are useful tools to analyze categorical data, particularly for small and moderate sample sizes. Mid-p tests strike a balance between overly conservative exact methods and asymptotic methods that frequently violate the nominal level. Here, we examine a mid-p version of the McNemar exact conditional test for the analysis of paired binomial proportions.

Methods

We compare the type I error rates and power of the mid-p test with those of the asymptotic McNemar test (with and without continuity correction), the McNemar exact conditional test, and an exact unconditional test using complete enumeration. We show how the mid-p test can be calculated using eight standard software packages, including Excel.

Results

The mid-p test performs well compared with the asymptotic, asymptotic with continuity correction, and exact conditional tests, and almost as good as the vastly more complex exact unconditional test. Even though the mid-p test does not guarantee preservation of the significance level, it did not violate the nominal level in any of the 9595 scenarios considered in this article. It was almost as powerful as the asymptotic test. The exact conditional test and the asymptotic test with continuity correction did not perform well for any of the considered scenarios.

Conclusions

The easy-to-calculate mid-p test is an excellent alternative to the complex exact unconditional test. Both can be recommended for use in any situation. We also recommend the asymptotic test if small but frequent violations of the nominal level is acceptable.
Appendix
Available only for authorised users
Literature
1.
go back to reference Bentur L, Lapidot M, Livnat G, Hakim F, Lidroneta-Katz C, Porat I, Vilozni D, Elhasid R: Airway reactivity in children before and after stem cell transplantation. Pediatr Pulm. 2009, 44: 845-850. 10.1002/ppul.20964.CrossRef Bentur L, Lapidot M, Livnat G, Hakim F, Lidroneta-Katz C, Porat I, Vilozni D, Elhasid R: Airway reactivity in children before and after stem cell transplantation. Pediatr Pulm. 2009, 44: 845-850. 10.1002/ppul.20964.CrossRef
2.
go back to reference Cavo M, Pantani L, Petrucci MT, Patriarca F, Zamagni E, Donnarumma D, Crippa C, Boccadoro M, Perrone G, Falcone A, Nozzoli C, Zambello R, Masini L, Furlan A, Brioli A, Derudas D, Ballanti S, Dessanti ML, De Stefano V, Carella AM, Marcatti M, Nozza A, Ferrara F, Callea V, Califano C, Pezzi A, Baraldi A, Grasso M, Musto P, Palumno A: Bortezomib-Thalidomide- Dexamethasone is superior to Thalidomide-Dexamethasone as consolidation therapy after autologous hematopoietic stem cell transplantation in patients with newly diagnosed multiple myeloma. Blood. 2012, 120: 9-19. 10.1182/blood-2012-02-408898.CrossRefPubMed Cavo M, Pantani L, Petrucci MT, Patriarca F, Zamagni E, Donnarumma D, Crippa C, Boccadoro M, Perrone G, Falcone A, Nozzoli C, Zambello R, Masini L, Furlan A, Brioli A, Derudas D, Ballanti S, Dessanti ML, De Stefano V, Carella AM, Marcatti M, Nozza A, Ferrara F, Callea V, Califano C, Pezzi A, Baraldi A, Grasso M, Musto P, Palumno A: Bortezomib-Thalidomide- Dexamethasone is superior to Thalidomide-Dexamethasone as consolidation therapy after autologous hematopoietic stem cell transplantation in patients with newly diagnosed multiple myeloma. Blood. 2012, 120: 9-19. 10.1182/blood-2012-02-408898.CrossRefPubMed
3.
go back to reference Agresti A: Dealing with discreteness: making ‘exact’ confidence intervals for proportions, differences of proportions, and odds ratios more exact. Stat Methods Med Res. 2003, 12: 3-21. 10.1191/0962280203sm311ra.CrossRefPubMed Agresti A: Dealing with discreteness: making ‘exact’ confidence intervals for proportions, differences of proportions, and odds ratios more exact. Stat Methods Med Res. 2003, 12: 3-21. 10.1191/0962280203sm311ra.CrossRefPubMed
4.
go back to reference Lancaster HO: Significance tests in discrete distributions. J Am Stat Assoc. 1961, 56: 223-234. 10.1080/01621459.1961.10482105.CrossRef Lancaster HO: Significance tests in discrete distributions. J Am Stat Assoc. 1961, 56: 223-234. 10.1080/01621459.1961.10482105.CrossRef
5.
go back to reference Lydersen S, Fagerland MW, Laake P: Recommended tests for association in 2×2 tables. Stat Med. 2009, 28: 1159-1175. 10.1002/sim.3531.CrossRefPubMed Lydersen S, Fagerland MW, Laake P: Recommended tests for association in 2×2 tables. Stat Med. 2009, 28: 1159-1175. 10.1002/sim.3531.CrossRefPubMed
6.
go back to reference Agresti A: Categorical Data Analysis (3rd edn). 2013, Hoboken, NJ: Wiley, Agresti A: Categorical Data Analysis (3rd edn). 2013, Hoboken, NJ: Wiley,
7.
go back to reference McNemar Q: Note on the sampling error of the difference between correlated proportions or percentages. Psychometrika. 1947, 12: 153-157. 10.1007/BF02295996.CrossRefPubMed McNemar Q: Note on the sampling error of the difference between correlated proportions or percentages. Psychometrika. 1947, 12: 153-157. 10.1007/BF02295996.CrossRefPubMed
8.
go back to reference Edwards AL: Note on the “correction for continuity” in testing the significance of the difference between correlated proportions. Psychometrika. 1948, 13 (3): 185-187. 10.1007/BF02289261.CrossRefPubMed Edwards AL: Note on the “correction for continuity” in testing the significance of the difference between correlated proportions. Psychometrika. 1948, 13 (3): 185-187. 10.1007/BF02289261.CrossRefPubMed
9.
go back to reference Altman DG: Practical Statistics for Medical Research. 1991, Boca Raton Fl: Chapman & Hall/CRC, Altman DG: Practical Statistics for Medical Research. 1991, Boca Raton Fl: Chapman & Hall/CRC,
10.
go back to reference Fleiss JL, Levin B, Paik MC: Statistical Methods for Rates and Proportions (3rd edn). 2003, Hoboken, NJ: Wiley,CrossRef Fleiss JL, Levin B, Paik MC: Statistical Methods for Rates and Proportions (3rd edn). 2003, Hoboken, NJ: Wiley,CrossRef
11.
go back to reference Mehta CR, Walsh SJ: Comparison of exact, mid-p, and Mantel-Haenszel confidence intervals for the common odds ratio across several 2×2 contingency tables. Am Stat. 1992, 46: 146-150. Mehta CR, Walsh SJ: Comparison of exact, mid-p, and Mantel-Haenszel confidence intervals for the common odds ratio across several 2×2 contingency tables. Am Stat. 1992, 46: 146-150.
12.
go back to reference Lydersen S, Laake P: Power comparison of two-sided exact tests for association in 2×2 contingency tables using standard, mid-P, and randomized test versions. Stat Med. 2003, 22: 3859-3871. 10.1002/sim.1671.CrossRefPubMed Lydersen S, Laake P: Power comparison of two-sided exact tests for association in 2×2 contingency tables using standard, mid-P, and randomized test versions. Stat Med. 2003, 22: 3859-3871. 10.1002/sim.1671.CrossRefPubMed
13.
go back to reference Hirji KF: Exact Analysis of Discrete Data. 2006, Boca Raton, FL: Chapman & Hall/CRC, Hirji KF: Exact Analysis of Discrete Data. 2006, Boca Raton, FL: Chapman & Hall/CRC,
14.
go back to reference Hirji KF, Tan S-J, Elashoff RM: A quasi-exact test for comparing two binomial proportions. Stat Med. 1991, 10: 1137—1153-CrossRefPubMed Hirji KF, Tan S-J, Elashoff RM: A quasi-exact test for comparing two binomial proportions. Stat Med. 1991, 10: 1137—1153-CrossRefPubMed
15.
go back to reference Suissa S, Shuster JJ: The 2×2 matched-pairs trial: exact unconditional design and analysis. Biometrics. 1991, 47: 361-372. 10.2307/2532131.CrossRefPubMed Suissa S, Shuster JJ: The 2×2 matched-pairs trial: exact unconditional design and analysis. Biometrics. 1991, 47: 361-372. 10.2307/2532131.CrossRefPubMed
16.
go back to reference Fagerland MW: Exact and mid-P confidence intervals for the odds ratio. Stata J. 2012, 12: 505-514. Fagerland MW: Exact and mid-P confidence intervals for the odds ratio. Stata J. 2012, 12: 505-514.
17.
go back to reference Haviland MG: Yates’s correction for continuity and the analysis of 2×2 contingency tables. Stat Med. 1990, 9: 363-367. 10.1002/sim.4780090403.CrossRefPubMed Haviland MG: Yates’s correction for continuity and the analysis of 2×2 contingency tables. Stat Med. 1990, 9: 363-367. 10.1002/sim.4780090403.CrossRefPubMed
18.
go back to reference Lloyd CJ: A new exact and more powerful unconditional test of no treatment effect from binary matched pairs. Biometrics. 2008, 64: 716-723. 10.1111/j.1541-0420.2007.00936.x.CrossRefPubMed Lloyd CJ: A new exact and more powerful unconditional test of no treatment effect from binary matched pairs. Biometrics. 2008, 64: 716-723. 10.1111/j.1541-0420.2007.00936.x.CrossRefPubMed
Metadata
Title
The McNemar test for binary matched-pairs data: mid-p and asymptotic are better than exact conditional
Authors
Morten W Fagerland
Stian Lydersen
Petter Laake
Publication date
01-12-2013
Publisher
BioMed Central
Published in
BMC Medical Research Methodology / Issue 1/2013
Electronic ISSN: 1471-2288
DOI
https://doi.org/10.1186/1471-2288-13-91

Other articles of this Issue 1/2013

BMC Medical Research Methodology 1/2013 Go to the issue