 McNemar's test

In statistics, McNemar's test is a nonparametric method 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
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. p_{a} + p_{b} = p_{a} + p_{c} and p_{c} + p_{d} = p_{b} + p_{d}.
Thus the null hypothesis is^{[1]}
 p_{b} = p_{c}.
Here p_{a}, etc., denote the theoretical probability of occurrences in cells with the corresponding label.
The McNemar test statistic with Yates's correction for continuity^{[3]} is given by:^{[citation needed]}
An alternative correction of 1 instead of 0.5 is attributed to Edwards ^{[4]} by Fleiss ^{[5]}, resulting in a similar equation:
Under the null hypothesis, with a sufficiently large number of discordants (cells b and c), χ^{2} has a chisquared distribution with 1 degree of freedom. If either b or c is small (b + c < 25) then χ^{2} is not wellapproximated by the chisquared 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 χ^{2} statistic to the right tail of the chisquared distribution, the pvalue that is found is twosided, whereas to achieve a twosided pvalue in the case of the exact binomial test, the pvalue of the extreme tail should be multiplied by 2.
If the χ^{2} result is significant, this provides sufficient evidence to reject the null hypothesis, in favour of the alternative hypothesis that p_{b} ≠ p_{c}, which would mean that the marginal proportions are significantly different from each other.
Example
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 beforeandafter 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
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
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 posttreatment 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
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:
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
 The Cochran's Q test is a generalization that allows for more than two row and/or column categories.
 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
References
 ^ ^{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.
 ^ Spielman RS; McGinnis RE; Ewens WJ (Mar 1993). "Transmission test for linkage disequilibrium: the insulin gene region and insulindependent diabetes mellitus (IDDM)". Am J Hum Genet. 52 (3): 506–16. PMC 1682161. PMID 8447318. http://www.pubmedcentral.nih.gov/articlerender.fcgi?tool=pmcentrez&artid=1682161.
 ^ 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
 ^ Edwards, A (1948). "Note on the "correction for continuity" in testing the significance of the difference between correlated proportions". Psychometrika 13: 185–187.
 ^ Fleiss, J. L. (1981). Statistical methods for rates and proportions (2nd ed.). New York: John Wiley. p. 114. ISBN 0471064289.
 ^ Sheskin (2004)
 ^ Durkalski, V.L.; Palesch, Y.Y.; Lipsitz, S.R.; Rust, P.F. (2003). "Analysis of clustered matchedpair data". Statistics in medicine 22 (15): 2417–28. doi:10.1002/sim.1438. PMID 12872299. http://www3.interscience.wiley.com/journal/104545274/abstract. Retrieved April 1, 2009.
 ^ Rice, John (1995). Mathematical Statistics and Data Analysis (Second ed.). Belmont, California: Duxbury Press. pp. 492–494. ISBN 0534209343.
 ^ Liddell, D. (1976). "Practical Tests of 2 × 2 Contingency Tables". Journal of the Royal Statistical Society 25 (4): 295–304. JSTOR 2988087.
 ^ http://rimarcik.com/en/navigator/znominal.html
 ^ Sun, Xuezheng; Yang, Zhao (2008). "Generalized McNemar's Test for Homogeneity of the Marginal Distributions". SAS Global Forum. http://www2.sas.com/proceedings/forum2008/3822008.pdf.
 ^ http://www.johnuebersax.com/stat/mcnemar.htm#bhapkar
External links
Categories: Statistical tests
 Categorical data
 Nonparametric statistics
 Summary statistics for contingency tables
Wikimedia Foundation. 2010.
См. также в других словарях:
McNemarTest — Der McNemar Test ist ein statistischer Test für verbundene Stichproben, bei denen ein dichotomes Merkmal betrachtet wird, wie es z. B. bei einer Vierfeldertafel vorkommen kann. Verbundene Stichproben liegen dann vor, wenn zwischen den… … Deutsch Wikipedia
Test (statistique) — Pour les articles homonymes, voir Test. En statistiques, un test d hypothèse est une démarche consistant à rejeter ou à ne pas rejeter (rarement accepter) une hypothèse statistique, appelée hypothèse nulle, en fonction d un jeu de données… … Wikipédia en Français
test — 1. To prove; to try a substance; to determine the chemical nature of a substance by means of reagents. 2. A method of examination, as to determine the presence or absence of a definite disease or of some substance in any of the fluids, tissues,… … Medical dictionary
McNemar test — a modified chi squared test performed on data with one degree of freedom to compare findings in a matched analysis or in a before and after study on the same individual … Medical dictionary
Pearson's chisquared test — (χ2) is the best known of several chi squared tests – statistical procedures whose results are evaluated by reference to the chi squared distribution. Its properties were first investigated by Karl Pearson in 1900.[1] In contexts where it is… … Wikipedia
Chisquared test — Chi square test is often shorthand for Pearson s chi square test. A chi square test, also referred to as chi squared test or χ2 test, is any statistical hypothesis test in which the sampling distribution of the test statistic is a chi square… … Wikipedia
Student's ttest — A t test is any statistical hypothesis test in which the test statistic follows a Student s t distribution if the null hypothesis is supported. It is most commonly applied when the test statistic would follow a normal distribution if the value of … Wikipedia
Cochran's C test — In statistics, Cochran s C test [1], named after William G. Cochran, is a one sided upper limit variance outlier test. The C test is used to decide if a single estimate of a variance (or a standard deviation) is significantly larger than a group… … Wikipedia
Chisquare test — is often shorthand for Pearson s chi square test. A chi square test (also chi squared or chi^2 test) is any statistical hypothesis test in which the test statistic has a chi square distribution when the null hypothesis is true, or any in which… … Wikipedia
Gold standard (test) — For other uses, see Gold standard (disambiguation). In medicine and statistics, gold standard test refers to a diagnostic test or benchmark that is the best available under reasonable conditions. It does not have to be necessarily the best… … Wikipedia