digplanet beta 1: Athena
Share digplanet:

Agriculture

Applied sciences

Arts

Belief

Business

Chronology

Culture

Education

Environment

Geography

Health

History

Humanities

Language

Law

Life

Mathematics

Nature

People

Politics

Science

Society

Technology

In statistics, McNemar's test is a normal approximation used on 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 ("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 genetic linkage.[2]

Contents

Definition [edit]

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]


\begin{align}
H_0 & :~p_b=p_c \\
H_1 & :~p_b \ne p_c
\end{align}

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

The McNemar test statistic is:

\chi^2 = {(b-c)^2 \over b+c}.

The statistic with Yates's correction for continuity[3] is given by:[citation needed]

\chi^2 = {(|b-c|-0.5)^2 \over b+c}.

An alternative correction of 1 instead of 0.5 is attributed to Edwards [4] by Fleiss,[5] resulting in a similar equation:

\chi^2 = {(|b-c|-1)^2 \over b+c}.

Under the null hypothesis, with a sufficiently large number of discordants (cells b and c), \chi^2 has a chi-squared distribution with 1 degree of freedom. If either b or c is small (b + c < 25) then \chi^2 is not well-approximated by the chi-squared distribution.[citation needed] The binomial distribution can be used to obtain the exact distribution for an equivalent to the uncorrected form of McNemar's test statistic.[6] In this formulation, b is compared to a binomial distribution with size parameter equal to b + c and "probability of success" = ½, which is essentially the same as the binomial sign test. For b + c < 25, the binomial calculation should be performed, and indeed, most software packages simply perform the binomial calculation in all cases, since the result then is an exact test in all cases. When comparing the resulting \chi^2 statistic to the right tail of the chi-squared distribution, the p-value that is found is two-sided, whereas to achieve a two-sided p-value in the case of the exact binomial test, the p-value of the extreme tail should be multiplied by 2.

If the \chi^2 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.

Example [edit]

In the following example, a researcher attempts to determine if a drug has an effect on a particular disease. 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 with Yates's continuity correction is

\chi^2 = {(|121 - 59| - 0.5)^2 \over {121 + 59}}

has the value 21.01, which is extremely unlikely from the distribution implied by the null hypothesis. Thus the test provides strong evidence to reject the null hypothesis of no treatment effect.

Discussion [edit]

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.

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.[citation needed] 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.[7]

Information in the pairings [edit]

John Rice wrote:[8]

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:


\begin{array}{c|c|c}
\hline & \text{Tonsillectomy} & \text{No tonsillectomy} \\
\hline\text{Hodgkins} & 41 & 44 \\
\hline\text{Control} & 33 & 52
\end{array}
They calculated a chi-squared statistic of 1.53, which is not significant.[...] [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:

\begin{array}{cc}
& \text{Sibling} \\
\text{Patient} &
\begin{array}{c|c|c}
\hline & \text{No tonsillectomy} & \text{Tonsillectomy} \\
\hline\text{No tonsillectomy} & 37 & 7 \\
\hline\text{Tonsillectomy} & 15 & 26
\end{array}
\end{array}

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.

Related tests [edit]

  • The binomial sign test gives an exact test for the McNemar's test.
  • The Cochran's Q test for two "treatments" is equivalent to the McNemar's test.
  • The Liddell's exact test is an exact alternative to McNemar's test.[9][10]
  • The Stuart–Maxwell test is different generalization of the McNemar test, used for testing marginal homogeneity in a square table with more than two rows/columns.[11]
  • The Bhapkar's test (1966) is a more powerful alternative to the Stuart–Maxwell test.[12]

See also [edit]

References [edit]

  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. 
  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. ^ Yates, F (1934). Contingency table involving small numbers and the χ2 test. Supplement to the Journal of the Royal Statistical Society 1(2), 217–235.JSTOR Archive for the journal
  4. ^ Edwards, A (1948). "Note on the "correction for continuity" in testing the significance of the difference between correlated proportions". Psychometrika 13: 185–187. 
  5. ^ Fleiss, J. L. (1981). Statistical methods for rates and proportions (2nd ed.). New York: John Wiley & Sons. p. 114. ISBN 0-471-06428-9. 
  6. ^ Sheskin (2004)
  7. ^ 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. Retrieved April 1, 2009. 
  8. ^ Rice, John (1995). Mathematical Statistics and Data Analysis (Second ed.). Belmont, California: Duxbury Press. pp. 492–494. ISBN 0-534-20934-3. 
  9. ^ Liddell, D. (1976). "Practical Tests of 2 × 2 Contingency Tables". Journal of the Royal Statistical Society 25 (4): 295–304. JSTOR 2988087. 
  10. ^ "Maxwell's test, McNemar's test, Kappa test". Rimarcik.com. Retrieved 2012-11-22. 
  11. ^ Sun, Xuezheng; Yang, Zhao (2008). "Generalized McNemar's Test for Homogeneity of the Marginal Distributions". SAS Global Forum. 
  12. ^ "McNemar Tests of Marginal Homogeneity". John-uebersax.com. 2006-08-30. Retrieved 2012-11-22. 

External links [edit]


Original courtesy of Wikipedia: http://en.wikipedia.org/wiki/McNemar's_test — Please support Wikipedia.
A portion of the proceeds from advertising on Digplanet goes to supporting Wikipedia.
775 videos foundNext > 

Week 7 : TUTORIAL: MCNEMAR'S TEST, PART I

Week 7 : MCNEMAR TEST

McNemar Test - SPSS (part 1)

I demonstrate how to perform and interpret the McNemar Test (chi-square), which can be used to test the differences between related proportions/percentages (...

proportions (5) McNemar's test (repeated measures) in SPSS, and R

Part five in a series considering how to analyse proportions in SPSS, R commander and R using the binomial, chi square and McNemars tests. Aspects covered: 1...

How to Use SPSS-McNemar Test

Compare two related samples using a repeated measures design on a nominal scale outcome.

TEST DE McNEMAR Y COCHRAN (PARTE 1)

Vídeotutorial realizado dentro de la convocatoria 2011 para las ayudas a acciones de innovación docente en la UMH. Titulo del proyecto: VIDEOTUTORIALES DE R ...

11.3 Lecture - Part 5 of 8 - Math 133

Covers: Confidence Interval for Two Proportions; McNemar's Test for Difference in Proportions for Dependent Samples (11.3 Notes, pages 14-16) Lecture notes a...

11.3 Lecture - Part 7 of 8 - Math 133

Covers: McNemar's Test for Difference in Proportions for Dependent Samples - p-value method (11.3 Notes, page 16) Lecture notes available at http://personal....

免費統計教學範例17 McNemar's Test

Tutorial for SigmaPlot V.12 McNemar's Test SigmaPlot 科學繪圖統計軟體教學範例V.12 二維及三維科學繪圖軟體The technical graphing software choice for more than 100000 professional...

McNemar Test - SPSS (part 2)

I demonstrate how to perform and interpret the McNemar Test (chi-square), which can be used to test the differences between related proportions/percentages (...

775 videos foundNext > 

3 news items

 
Infection Control Today
Thu, 09 May 2013 07:56:35 -0700

The researchers used the Wilcoxon signed-rank test for continuous variables and the McNemar's test for categorical variables. The analyzed ICUs had 40,772 patient days in the study period with a median ventilation utilization ratio of 56 (IQR 42–65).

Healio

Healio
Mon, 06 May 2013 12:09:33 -0700

McNemar's test was used to compare difficulty recognizing ASD signs/symptoms among children from Latino English language, Latino Spanish language and white families, Zuckerman said during her presentation. A total of 62.6% of pediatricians responded ...
 
The Journal of Thoracic and Cardiovascular Surgery
Tue, 30 Apr 2013 06:36:18 -0700

We used 5 to 1 digit matching to identify the matched patients. After the propensity score match was performed, differences between the 2 groups were assessed using the paired t test or Wilcoxon signed rank test for continuous variables and McNemar's ...
Loading

Oops, we seem to be having trouble contacting Twitter

Talk About McNemar's test

You can talk about McNemar's test with people all over the world in our discussions.

Support Wikipedia

A portion of the proceeds from advertising on Digplanet goes to supporting Wikipedia. Please add your support for Wikipedia!