McNemar's test

McNemar's test is a statistical test used on paired nominal data. It is applied to 2 × 2 contingency tables with a dichotomous trait, with matched pairs of subjects, to determine whether the row and column marginal frequencies are equal (that is, whether there is "marginal homogeneity"). It is named after Quinn McNemar, who introduced it in 1947.[1] An application of the test in genetics is the transmission disequilibrium test for detecting linkage disequilibrium.[2]

The commonly used parameters to assess a diagnostic test in medical sciences are sensitivity and specificity. Sensitivity (or recall) is the ability of a test to correctly identify the people with disease. Specificity is the ability of the test to correctly identify those without the disease.

Now presume two tests are performed on the same group of patients. And also presume that these tests have identical sensitivity and specificity. In this situation one is carried away by these findings and presume that both the tests are equivalent. However this may not be the case. For this we have to study the patients with disease and patients without disease (by a reference test). We also have to find out where these two tests disagree with each other. This is precisely the basis of McNemar's test. This test compares the sensitivity and specificity of two diagnostic tests on the same group of patients.[3]

Definition

The test is applied to a 2 × 2 contingency table, which tabulates the outcomes of two tests on a sample of N subjects, as follows.

Test 2 positive Test 2 negative Row total
Test 1 positive a b a + b
Test 1 negative c d c + d
Column total a + c b + d N

The null hypothesis of marginal homogeneity states that the two marginal probabilities for each outcome are the same, i.e. pa + pb = pa + pc and pc + pd = pb + pd.

Thus the null and alternative hypotheses are[1]

Here pa, etc., denote the theoretical probability of occurrences in cells with the corresponding label.

The McNemar test statistic is:

Under the null hypothesis, with a sufficiently large number of discordants (cells b and c), has a chi-squared distribution with 1 degree of freedom. If the result is significant, this provides sufficient evidence to reject the null hypothesis, in favour of the alternative hypothesis that pb ≠ pc, which would mean that the marginal proportions are significantly different from each other.

Variations

If either b or c is small (b + c < 25) then is not well-approximated by the chi-squared distribution. [citation needed] An exact binomial test can then be used, where b is compared to a binomial distribution with size parameter n = b + c and p = 0.5. Effectively, the exact binomial test evaluates the imbalance in the discordants b and c. To achieve a two-sided P-value, the P-value of the extreme tail should be multiplied by 2. For bc:

which is simply twice the binomial distribution cumulative distribution function with p = 0.5 and n = b + c.

Edwards[4] proposed the following continuity corrected version of the McNemar test to approximate the binomial exact-P-value:

The mid-P McNemar test (mid-p binomial test) is calculated by subtracting half the probability of the observed b from the exact one-sided P-value, then double it to obtain the two-sided mid-P-value:[5][6]

This is equivalent to:

where the second term is the binomial distribution probability mass function and n = b + c. Binomial distribution functions are readily available in common software packages and the McNemar mid-P test can easily be calculated.[6]

The traditional advice has been to use the exact binomial test when b + c < 25. However, simulations have shown both the exact binomial test and the McNemar test with continuity correction to be overly conservative.[6] When b + c < 6, the exact-P-value always exceeds the common significance level 0.05. The original McNemar test was most powerful, but often slightly liberal. The mid-P version was almost as powerful as the asymptotic McNemar test and was not found to exceed the nominal significance level.

Examples

In the first example, a researcher attempts to determine if a drug has an effect on a particular disease. There are 314 patients, and they are diagnosed (disease: present or absent) before and after using the drug, which means that each sample can be described using 1 out of 4 combinations. Counts of individuals are given in the table, with the diagnosis (disease: present or absent) before treatment given in the rows, and the diagnosis after treatment in the columns. The test requires the same subjects to be included in the before-and-after measurements (matched pairs).

After: present After: absent Row total
Before: present 101 121 222
Before: absent 59 33 92
Column total 160 154 314

In this example, the null hypothesis of "marginal homogeneity" would mean there was no effect of the treatment. From the above data, the McNemar test statistic:

has the value 21.35, which is extremely unlikely to form the distribution implied by the null hypothesis (p < 0.001). Thus the test provides strong evidence to reject the null hypothesis of no treatment effect.

A second example illustrates differences between the asymptotic McNemar test and alternatives.[6] The data table is formatted as before, with different numbers in the cells:

After: present After: absent Row total
Before: present 59 6 65
Before: absent 16 80 96
Column total 75 86 161

With these data, the sample size (161 patients) is not small, however results from the McNemar test and other versions are different. The exact binomial test gives p = 0.053 and McNemar's test with continuity correction gives = 3.68 and p = 0.055. The asymptotic McNemar's test gives = 4.55 and p = 0.033 and the mid-P McNemar's test gives p = 0.035. Both the McNemar's test and mid-P version provide stronger evidence for a statistically significant treatment effect in this second example.

Discussion

An interesting observation when interpreting McNemar's test is that the elements of the main diagonal do not contribute to the decision about whether (in the above example) pre- or post-treatment condition is more favourable. Thus, the sum b + c can be small and statistical power of the tests described above can be low even though the number of pairs a + b + c + d is large (see second example above).

An extension of McNemar's test exists in situations where independence does not necessarily hold between the pairs; instead, there are clusters of paired data where the pairs in a cluster may not be independent, but independence holds between different clusters.[7] An example is analyzing the effectiveness of a dental procedure; in this case, a pair corresponds to the treatment of an individual tooth in patients who might have multiple teeth treated; the effectiveness of treatment of two teeth in the same patient is not likely to be independent, but the treatment of two teeth in different patients is more likely to be independent.[8]

Information in the pairings

In the 1970s, it was conjectured that retaining one's tonsils might protect against Hodgkin's lymphoma. John Rice wrote:[9]

85 Hodgkin's patients [...] had a sibling of the same sex who was free of the disease and whose age was within 5 years of the patient's. These investigators presented the following table:

They calculated a chi-squared statistic [...] [they] had made an error in their analysis by ignoring the pairings.[...] [their] samples were not independent, because the siblings were paired [...] we set up a table that exhibits the pairings:

It is to the second table that McNemar's test can be applied. Notice that the sum of the numbers in the second table is 85—the number of pairs of siblings—whereas the sum of the numbers in the first table is twice as big, 170—the number of individuals. The second table gives more information than the first. The numbers in the first table can be found by using the numbers in the second table, but not vice versa. The numbers in the first table give only the marginal totals of the numbers in the second table. McNemar's test allows the 15 and 7 pairs where the siblings had previously had differing treatment to their tonsils to be compared, as being relevant to the hypothesis, while ignoring the less informative 37 and 26 where the siblings had previously both had the treatment or to their tonsils or neither had.

See also

References

  1. ^ a b McNemar, Quinn (June 18, 1947). "Note on the sampling error of the difference between correlated proportions or percentages". Psychometrika. 12 (2): 153–157. doi:10.1007/BF02295996. PMID 20254758. S2CID 46226024.
  2. ^ Spielman RS; McGinnis RE; Ewens WJ (Mar 1993). "Transmission test for linkage disequilibrium: the insulin gene region and insulin-dependent diabetes mellitus (IDDM)". Am J Hum Genet. 52 (3): 506–16. PMC 1682161. PMID 8447318.
  3. ^ Hawass, N E (April 1997). "Comparing the sensitivities and specificities of two diagnostic procedures performed on the same group of patients". The British Journal of Radiology. 70 (832): 360–366. doi:10.1259/bjr.70.832.9166071. ISSN 0007-1285. PMID 9166071.
  4. ^ Edwards, A (1948). "Note on the "correction for continuity" in testing the significance of the difference between correlated proportions". Psychometrika. 13 (3): 185–187. doi:10.1007/bf02289261. PMID 18885738. S2CID 33607853.
  5. ^ Lancaster, H.O. (1961). "Significance tests in discrete distributions". J Am Stat Assoc. 56 (294): 223–234. doi:10.1080/01621459.1961.10482105.
  6. ^ a b c d Fagerland, M.W.; Lydersen, S.; Laake, P. (2013). "The McNemar test for binary matched-pairs data: mid-p and asymptotic are better than exact conditional". BMC Medical Research Methodology. 13: 91. doi:10.1186/1471-2288-13-91. PMC 3716987. PMID 23848987.
  7. ^ Yang, Z.; Sun, X.; Hardin, J.W. (2010). "A note on the tests for clustered matched-pair binary data". Biometrical Journal. 52 (5): 638–652. doi:10.1002/bimj.201000035. PMID 20976694. S2CID 29461324.
  8. ^ Durkalski, V.L.; Palesch, Y.Y.; Lipsitz, S.R.; Rust, P.F. (2003). "Analysis of clustered matched-pair data". Statistics in Medicine. 22 (15): 2417–28. doi:10.1002/sim.1438. PMID 12872299. S2CID 25909362. Archived from the original on January 5, 2013. Retrieved April 1, 2009.
  9. ^ Rice, John (1995). Mathematical Statistics and Data Analysis (Second ed.). Belmont, California: Duxbury Press. pp. 492–494. ISBN 978-0-534-20934-6.
  10. ^ Liddell, D. (1976). "Practical Tests of 2 × 2 Contingency Tables". Journal of the Royal Statistical Society. 25 (4): 295–304. doi:10.2307/2988087. JSTOR 2988087.
  11. ^ "Maxwell's test, McNemar's test, Kappa test". Rimarcik.com. Retrieved 2012-11-22.
  12. ^ Sun, Xuezheng; Yang, Zhao (2008). "Generalized McNemar's Test for Homogeneity of the Marginal Distributions" (PDF). SAS Global Forum.
  13. ^ Stuart, Alan (1955). "A Test for Homogeneity of the Marginal Distributions in a Two-Way Classification". Biometrika. 42 (3/4): 412–416. doi:10.1093/biomet/42.3-4.412. JSTOR 2333387.
  14. ^ Maxwell, A.E. (1970). "Comparing the Classification of Subjects by Two Independent Judges". The British Journal of Psychiatry. 116 (535): 651–655. doi:10.1192/bjp.116.535.651. PMID 5452368. S2CID 9211848.
  15. ^ "McNemar Tests of Marginal Homogeneity". John-uebersax.com. 2006-08-30. Retrieved 2012-11-22.
  16. ^ Bhapkar, V.P. (1966). "A Note on the Equivalence of Two Test Criteria for Hypotheses in Categorical Data". Journal of the American Statistical Association. 61 (313): 228–235. doi:10.1080/01621459.1966.10502021. JSTOR 2283057.
  17. ^ Yang, Z.; Sun, X.; Hardin, J.W. (2012). "Testing Marginal Homogeneity in Matched-Pair Polytomous Data". Therapeutic Innovation & Regulatory Science. 46 (4): 434–438. doi:10.1177/0092861512442021. S2CID 123109340.
  18. ^ Agresti, Alan (2002). Categorical Data Analysis (PDF). Hooken, New Jersey: John Wiley & Sons, Inc. p. 413. ISBN 978-0-471-36093-3.

Read other articles:

Paul von Hindenburg Presidente del Reich[1]Durata mandato12 maggio 1925 –2 agosto 1934 Capo del governoHans Luther Wilhelm Marx Hermann Müller Heinrich Brüning Franz von Papen Kurt von Schleicher Adolf Hitler PredecessoreFriedrich Ebert SuccessoreAdolf Hitler(come Führer und Reichskanzler) Dati generaliPartito politicoIndipendente UniversitàAccademia militare prussiana Firma Paul von HindenburgHindenburg nel 1914NascitaPosen, 2 ottobre 1847 MorteGut Neudec...

 

Diane Disney MillerDisney pada tahun 1951LahirDiane Marie Disney(1933-12-18)18 Desember 1933Los Angeles, California, Amerika SerikatMeninggal19 November 2013(2013-11-19) (umur 79)Napa, California, Amerika SerikatMakamForest Lawn Memorial Park, GlendaleSuami/istriRon W. Miller ​ ​(m. 1954⁠–⁠2013)​ (sampai kematiannya)Anak7Orang tuaWalt Disney Lillian Bounds DisneyKerabatLihat Keluarga DisneyTanda tangan Diane Marie Disney Miller (18 ...

 

本條目存在以下問題,請協助改善本條目或在討論頁針對議題發表看法。 此條目需要补充更多来源。 (2018年3月17日)请协助補充多方面可靠来源以改善这篇条目,无法查证的内容可能會因為异议提出而被移除。致使用者:请搜索一下条目的标题(来源搜索:羅生門 (電影) — 网页、新闻、书籍、学术、图像),以检查网络上是否存在该主题的更多可靠来源(判定指引)。 �...

This article is about the novel. For the album, see Neon Bible. For the film adaptation, see The Neon Bible (film). Book by John Kennedy Toole This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: The Neon Bible – news · newspapers · books · scholar · JSTOR (November 2006) (Learn how and when to remove this templa...

 

Artikel ini bukan mengenai Harry Lauder. Harry LauterLauter (kanan) dengan Willard Parker dalam Tales of the Texas Rangers, 1957.LahirHerman Arthur Lauter(1914-06-19)19 Juni 1914White Plains, New York, Amerika SerikatMeninggal30 Oktober 1990(1990-10-30) (umur 76)Ojai, California, Amerika SerikatPekerjaanPemeran(1930–1979), Artis (1979–1990)Tahun aktif1930–1979Suami/istriBarbara Jane Lauter (1952–1980) (bercerai) 1 anakDoris Gilbert (?-1990) (kematian Lauter) Herman Arthur Ha...

 

Writing system used for the Persian language For other scripts that have been used to write the Persian language, see Persian language § Orthography. Perso-Arabic script redirects here. For the Arabic script, see Arabic script. This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages) This article needs additional citations for verification. Please help improve this article by adding citation...

American actor Walter CoyCoy in Frontier, 1955.BornWalter Darrwin Coy(1909-01-31)January 31, 1909Great Falls, Cascade CountyMontana, U.S.DiedDecember 11, 1974(1974-12-11) (aged 65)Santa MariaSanta Barbara CountyCalifornia, U.S.Alma materUniversity of WashingtonOccupationActorYears active1936–1974Spouses Anne Burr(m. 1942; div. 194?) Pamela Gillespie ​ ​(m. 1948; div. 1961)​ Ruth E. Harburger ​ ​(m. 1969&...

 

1999 video game This article is about 1999 Video Game. For the Franchise, see Medal of Honor (video game series). For other uses, see Medal of Honor (disambiguation). 1999 video gameMedal of HonorEuropean cover artDeveloper(s)DreamWorks InteractivePublisher(s)Electronic ArtsProducer(s)Steven SpielbergPeter HirschmannDesigner(s)Christopher CrossLynn HensonProgrammer(s)Michael HeilemannAdrian JonesArtist(s)Matt HallSunil ThankamushyWriter(s)Steven SpielbergPeter HirschmannComposer(s)Michael Gia...

 

Aravis Sebuah Nexter Aravis dipamerkan dengan dudukan senapan mesin di atasnya Jenis Kendaraan mobilitas infanteri Negara asal Prancis Sejarah pemakaian Digunakan oleh Prancis Pada perang Perang di AfghanistanPercobaan kudeta Gabon tahun 2019 Sejarah produksi Produsen Nexter Diproduksi 2009-sekarang Spesifikasi Berat 125 t (138 ton pendek) Panjang 6 m (20 ft) Lebar 25 m (82 ft) Tinggi 25 m (82 ft) Awak 2-6 Senjatautama Stasiun senjata jarak j...

American football player (born 1998) Tagovailoa redirects here. For his brother, also a quarterback, see Taulia Tagovailoa. American football player Tua TagovailoaTagovailoa with the Dolphins in 2021No. 1 – Miami DolphinsPosition:QuarterbackPersonal informationBorn: (1998-03-02) March 2, 1998 (age 26)ʻEwa Beach, Hawaii, U.S.Height:6 ft 1 in (1.85 m)Weight:227 lb (103 kg)Career informationHigh school:Saint Louis (Honolulu, Hawaii)College:Alabama (2017–2019)NF...

 

Cet article possède un paronyme, voir Welbeck. Pour les articles homonymes, voir Michel Thomas et Thomas. Michel HouellebecqMichel Houellebecq en 2016.BiographieNaissance 26 février 1956 (68 ans)Saint-Pierre (France)Nom de naissance Michel Thomas[1]Pseudonyme Michel HouellebecqNationalité françaiseFormation École nationale supérieure Louis-Lumière (jusqu'en 1981)Institut national agronomique Paris-GrignonLycée Chaptal de ParisActivité Écrivain, acteur, réalisateur, scénarist...

 

本條目存在以下問題,請協助改善本條目或在討論頁針對議題發表看法。 此條目可参照英語維基百科相應條目来扩充。 (2022年12月23日)若您熟悉来源语言和主题,请协助参考外语维基百科扩充条目。请勿直接提交机械翻译,也不要翻译不可靠、低品质内容。依版权协议,译文需在编辑摘要注明来源,或于讨论页顶部标记{{Translated page}}标签。 此條目需要补充更多来源。 (2022年...

Vue d'artiste d'un impact géant, montrant notamment la formation d'une synestia, sorte de nuage très dense fait de matière terrestre en évaporation qui entoure la planète. L’hypothèse de l'impact géant propose que la Lune a été créée à partir de la matière éjectée par une collision entre la jeune Terre et un corps planétoïde (protoplanète) de la taille de Mars nommé Théia. Élaborée dans les années 1970, cette hypothèse demeure la plus robuste pour expliquer la format...

 

Questa voce sull'argomento contee del Kentucky è solo un abbozzo. Contribuisci a migliorarla secondo le convenzioni di Wikipedia. Contea di CaseyconteaLocalizzazioneStato Stati Uniti Stato federato Kentucky AmministrazioneCapoluogoLiberty Data di istituzione1807 TerritorioCoordinatedel capoluogo37°19′12″N 84°55′48″W37°19′12″N, 84°55′48″W (Contea di Casey) Superficie1 154 km² Abitanti15 447 (2000) Densità13,39 ab./km² Altre informazioniFu...

 

Stasiun Tabing P04M06 Stasiun TabingLokasiJalan AdinegoroBungo Pasang, Koto Tangah, Padang, Sumatera BaratIndonesiaKoordinat0°51′45″S 100°20′40″E / 0.86250°S 100.34444°E / -0.86250; 100.34444Koordinat: 0°51′45″S 100°20′40″E / 0.86250°S 100.34444°E / -0.86250; 100.34444Ketinggian+2 mOperator Kereta Api IndonesiaDivisi Regional II Sumatera Barat Letakkm 16+340 lintas Teluk Bayur–Padang–Lubuk Alung–Sawahlunto[1]...

  ميّز عن كويكبة.كويكبمعلومات عامةصنف فرعي من كوكب صغيرجرم نظام شمسي صغير جزء من نظام مقيد بالجاذبية الاستعمال استعمار الكويكبات تعدين فضائي تعديل - تعديل مصدري - تعديل ويكي بيانات جزء من سلسلة مقالات حولالمجموعة الشمسية المكونات الشمس كوكب أقمار الكواكب الصغيرة كوي�...

 

The Red DancePoster teatrikalSutradaraRaoul WalshDitulis olehMalcolm Stuart BoylanEleanor BrowneBerdasarkanThe Red Dancer of Moscow olehHenry Leyford GatesPemeranDolores del RíoCharles FarrellIvan LinowPenata musikErno RapeeS.L. RothafelSinematograferCharles G. ClarkeJack A. MartaPenyuntingLouis R. LoefflerDistributorFox Film CorporationTanggal rilis 25 Juni 1928 (1928-06-25) [1]Durasi103 menitNegaraAmerika SerikatBahasaBisu (intertitel Inggris)Pendapatankotor$1.3 jut...

 

This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages) This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: List of Huguenots – news · newspapers · books · scholar · JSTOR (April 2022) (Learn how and when to remove...

Daihatsu Gran MaxDaihatsu Gran Max 1.3 D van 2015 (S401RV; pra-facelift, Indonesia)InformasiProdusenAstra DaihatsuJuga disebutToyota TownAce/LiteAce (Jepang)Mazda Bongo (Jepang)[1]Masa produksi2007-sekarangPerakitanSunter, DKI JakartaBodi & rangkaKelasMinibus, PikapBentuk kerangkaVan, PikapTata letakMesin tengah, penggerak roda belakangMobil terkaitDaihatsu LuxioPenyalur dayaMesin1298 cc K3-DE I4 bensin1495 cc 3SZ-VE I4 bensin1496 cc 2NR-VE I4 bensinKronologiPendahuluDai...

 

17th-century English parliament Third Protectorate Parliament ← 1656 December 1658 – January 1659 1660 → Members elected →All 567 seats of the House of Commons 284 seats were needed for a majority   First party Second party   Leader John Thurloe Harry Vane Party Protectorate Faction Commonwealthsmen Leader's seat Cambridge University Whitchurch Popular vote - - Percentage - - Parliaments of England1604–1705 ParliamentDate Blessed Parlia...