Jump to content

McNemar's test: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Staats (talk | contribs)
No edit summary
Cochran test
Line 41: Line 41:
An interesting observation when interpreting McNemar's test is that the elements of the main diagonal contribute no information whatsoever to the decision if (in the above example) pre- or post-treatment condition is more favourable.
An interesting observation when interpreting McNemar's test is that the elements of the main diagonal contribute no information whatsoever to the decision if (in the above example) pre- or post-treatment condition is more favourable.


==Related tests==
*The [[Cochran test]] is a generalization that allows for more than two row and/or column categories.


== Online Calculators ==
== Online Calculators ==

Revision as of 22:39, 23 February 2008

In statistics, McNemar's test is a non-parametric method used on nominal data to determine whether the row and column marginal frequencies are equal. It is named after Q. McNemar, who introduced it in 1947. It is applied to 2 × 2 contingency tables with a dichotomous trait with matched pairs of subjects.

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: +/−) before treatment given in the columns (before), and the diagnosis after treatment in the rows (+/−) (after). The test requires the same subjects to be included in the before- and after measurements (matched pairs).

before
+total
after+10159160
12133154
totals22292314

Cells represented in the following manner by the letters a, b, c and d, The totals across rows and columns marginal totals, and the grand total is represented by n:

before
+total
after+aba + b
cdc + d
totalsa+cb+dn

Marginal homogeneity occurs when the row totals are equal to the column totals, a and d in each equation can be cancelled; leaving b equal to c:

In this example, "marginal homogeneity" would mean there was no effect of the treatment.

The McNemar statistic is shown below:

is a chi-squared statistic with 1 degree of freedom. The formula may be re-written to correct for discontinuity:

The marginal frequencies are not homogeneous if the result is significant p < 0.05. If b and/or c are small (b + c < 20) then χ2 is not approximated by the chi-square distribution and a sign test should instead be used.

An interesting observation when interpreting McNemar's test is that the elements of the main diagonal contribute no information whatsoever to the decision if (in the above example) pre- or post-treatment condition is more favourable.

  • The Cochran test is a generalization that allows for more than two row and/or column categories.

Online Calculators

Vassar College's McNemar 2x2 Grid