<s>
In	O
statistics	O
,	O
McNemar	B-General_Concept
's	I-General_Concept
test	I-General_Concept
is	O
a	O
statistical	O
test	O
used	O
on	O
paired	O
nominal	O
data	O
.	O
</s>
<s>
It	O
is	O
applied	O
to	O
2×2	O
contingency	B-Application
tables	I-Application
with	O
a	O
dichotomous	O
trait	O
,	O
with	O
matched	O
pairs	O
of	O
subjects	O
,	O
to	O
determine	O
whether	O
the	O
row	O
and	O
column	O
marginal	O
frequencies	O
are	O
equal	O
(	O
that	O
is	O
,	O
whether	O
there	O
is	O
"	O
marginal	O
homogeneity	O
"	O
)	O
.	O
</s>
<s>
This	O
is	O
precisely	O
the	O
basis	O
of	O
McNemar	B-General_Concept
's	I-General_Concept
test	I-General_Concept
.	O
</s>
<s>
The	O
test	O
is	O
applied	O
to	O
a	O
2×2	O
contingency	B-Application
table	I-Application
,	O
which	O
tabulates	O
the	O
outcomes	O
of	O
two	O
tests	O
on	O
a	O
sample	O
of	O
N	O
subjects	O
,	O
as	O
follows	O
.	O
</s>
<s>
The	O
null	B-General_Concept
hypothesis	I-General_Concept
of	O
marginal	O
homogeneity	O
states	O
that	O
the	O
two	O
marginal	O
probabilities	O
for	O
each	O
outcome	O
are	O
the	O
same	O
,	O
i.e.	O
</s>
<s>
The	O
McNemar	B-General_Concept
test	I-General_Concept
statistic	O
is	O
:	O
</s>
<s>
Under	O
the	O
null	B-General_Concept
hypothesis	I-General_Concept
,	O
with	O
a	O
sufficiently	O
large	O
number	O
of	O
discordants	O
(	O
cells	O
b	O
and	O
c	O
)	O
,	O
has	O
a	O
chi-squared	O
distribution	O
with	O
1	O
degree	O
of	O
freedom	O
.	O
</s>
<s>
If	O
the	O
result	O
is	O
significant	B-General_Concept
,	O
this	O
provides	O
sufficient	O
evidence	O
to	O
reject	O
the	O
null	B-General_Concept
hypothesis	I-General_Concept
,	O
in	O
favour	O
of	O
the	O
alternative	O
hypothesis	O
that	O
pb≠pc	O
,	O
which	O
would	O
mean	O
that	O
the	O
marginal	O
proportions	O
are	O
significantly	O
different	O
from	O
each	O
other	O
.	O
</s>
<s>
Edwards	O
proposed	O
the	O
following	O
continuity	O
corrected	O
version	O
of	O
the	O
McNemar	B-General_Concept
test	I-General_Concept
to	O
approximate	O
the	O
binomial	O
exact-P-value	O
:	O
</s>
<s>
However	O
,	O
simulations	O
have	O
shown	O
both	O
the	O
exact	O
binomial	O
test	O
and	O
the	O
McNemar	B-General_Concept
test	I-General_Concept
with	O
continuity	O
correction	O
to	O
be	O
overly	O
conservative	O
.	O
</s>
<s>
When	O
b	O
+	O
c	O
<	O
6	O
,	O
the	O
exact-P-value	O
always	O
exceeds	O
the	O
common	O
significance	B-General_Concept
level	I-General_Concept
0.05	O
.	O
</s>
<s>
The	O
original	O
McNemar	B-General_Concept
test	I-General_Concept
was	O
most	O
powerful	O
,	O
but	O
often	O
slightly	O
liberal	O
.	O
</s>
<s>
The	O
mid-P	O
version	O
was	O
almost	O
as	O
powerful	O
as	O
the	O
asymptotic	O
McNemar	B-General_Concept
test	I-General_Concept
and	O
was	O
not	O
found	O
to	O
exceed	O
the	O
nominal	O
significance	B-General_Concept
level	I-General_Concept
.	O
</s>
<s>
In	O
this	O
example	O
,	O
the	O
null	B-General_Concept
hypothesis	I-General_Concept
of	O
"	O
marginal	O
homogeneity	O
"	O
would	O
mean	O
there	O
was	O
no	O
effect	O
of	O
the	O
treatment	O
.	O
</s>
<s>
From	O
the	O
above	O
data	O
,	O
the	O
McNemar	B-General_Concept
test	I-General_Concept
statistic	O
:	O
</s>
<s>
has	O
the	O
value	O
21.35	O
,	O
which	O
is	O
extremely	O
unlikely	O
to	O
form	O
the	O
distribution	O
implied	O
by	O
the	O
null	B-General_Concept
hypothesis	I-General_Concept
(	O
P	O
<	O
0.001	O
)	O
.	O
</s>
<s>
Thus	O
the	O
test	O
provides	O
strong	O
evidence	O
to	O
reject	O
the	O
null	B-General_Concept
hypothesis	I-General_Concept
of	O
no	O
treatment	O
effect	O
.	O
</s>
<s>
A	O
second	O
example	O
illustrates	O
differences	O
between	O
the	O
asymptotic	O
McNemar	B-General_Concept
test	I-General_Concept
and	O
alternatives	O
.	O
</s>
<s>
With	O
these	O
data	O
,	O
the	O
sample	O
size	O
(	O
161	O
patients	O
)	O
is	O
not	O
small	O
,	O
however	O
results	O
from	O
the	O
McNemar	B-General_Concept
test	I-General_Concept
and	O
other	O
versions	O
are	O
different	O
.	O
</s>
<s>
The	O
exact	O
binomial	O
test	O
gives	O
P	O
=	O
0.053	O
and	O
McNemar	B-General_Concept
's	I-General_Concept
test	I-General_Concept
with	O
continuity	O
correction	O
gives	O
=	O
3.68	O
and	O
P	O
=	O
0.055	O
.	O
</s>
<s>
The	O
asymptotic	O
McNemar	B-General_Concept
's	I-General_Concept
test	I-General_Concept
gives	O
=	O
4.55	O
and	O
P	O
=	O
0.033	O
and	O
the	O
mid-P	O
McNemar	B-General_Concept
's	I-General_Concept
test	I-General_Concept
gives	O
P	O
=	O
0.035	O
.	O
</s>
<s>
Both	O
the	O
McNemar	B-General_Concept
's	I-General_Concept
test	I-General_Concept
and	O
mid-P	O
version	O
provide	O
stronger	O
evidence	O
for	O
a	O
statistically	B-General_Concept
significant	I-General_Concept
treatment	O
effect	O
in	O
this	O
second	O
example	O
.	O
</s>
<s>
An	O
interesting	O
observation	O
when	O
interpreting	O
McNemar	B-General_Concept
's	I-General_Concept
test	I-General_Concept
is	O
that	O
the	O
elements	O
of	O
the	O
main	O
diagonal	O
do	O
not	O
contribute	O
to	O
the	O
decision	O
about	O
whether	O
(	O
in	O
the	O
above	O
example	O
)	O
pre	O
-	O
or	O
post-treatment	O
condition	O
is	O
more	O
favourable	O
.	O
</s>
<s>
An	O
extension	O
of	O
McNemar	B-General_Concept
's	I-General_Concept
test	I-General_Concept
exists	O
in	O
situations	O
where	O
independence	O
does	O
not	O
necessarily	O
hold	O
between	O
the	O
pairs	O
;	O
instead	O
,	O
there	O
are	O
clusters	O
of	O
paired	O
data	O
where	O
the	O
pairs	O
in	O
a	O
cluster	O
may	O
not	O
be	O
independent	O
,	O
but	O
independence	O
holds	O
between	O
different	O
clusters	O
.	O
</s>
<s>
They	O
calculated	O
a	O
chi-squared	B-General_Concept
statistic	I-General_Concept
 [ ... ] 	O
 [ they ] 	O
had	O
made	O
an	O
error	O
in	O
their	O
analysis	O
by	O
ignoring	O
the	O
pairings.[...]	O
</s>
<s>
It	O
is	O
to	O
the	O
second	O
table	O
that	O
McNemar	B-General_Concept
's	I-General_Concept
test	I-General_Concept
can	O
be	O
applied	O
.	O
</s>
<s>
McNemar	B-General_Concept
's	I-General_Concept
test	I-General_Concept
allows	O
the	O
15	O
and	O
7	O
pairs	O
where	O
the	O
siblings	O
had	O
previously	O
had	O
differing	O
treatment	O
to	O
their	O
tonsils	O
to	O
be	O
compared	O
,	O
as	O
being	O
relevant	O
to	O
the	O
hypothesis	O
,	O
while	O
ignoring	O
the	O
less	O
informative	O
37	O
and	O
26	O
where	O
the	O
siblings	O
had	O
previously	O
both	O
had	O
the	O
treatment	O
or	O
to	O
their	O
tonsils	O
or	O
neither	O
had	O
.	O
</s>
<s>
The	O
binomial	O
sign	B-General_Concept
test	I-General_Concept
gives	O
an	O
exact	O
test	O
for	O
the	O
McNemar	B-General_Concept
's	I-General_Concept
test	I-General_Concept
.	O
</s>
<s>
The	O
Cochran	B-General_Concept
's	I-General_Concept
Q	I-General_Concept
test	I-General_Concept
is	O
an	O
extension	O
of	O
the	O
McNemar	B-General_Concept
's	I-General_Concept
test	I-General_Concept
for	O
more	O
than	O
two	O
"	O
treatments	O
"	O
.	O
</s>
<s>
The	O
Liddell	O
's	O
exact	O
test	O
is	O
an	O
exact	O
alternative	O
to	O
McNemar	B-General_Concept
's	I-General_Concept
test	I-General_Concept
.	O
</s>
<s>
The	O
Stuart	O
–	O
Maxwell	O
test	O
is	O
different	O
generalization	O
of	O
the	O
McNemar	B-General_Concept
test	I-General_Concept
,	O
used	O
for	O
testing	O
marginal	O
homogeneity	O
in	O
a	O
square	O
table	O
with	O
more	O
than	O
two	O
rows/columns	O
.	O
</s>
<s>
The	O
McNemar	B-General_Concept
's	I-General_Concept
test	I-General_Concept
is	O
a	O
special	O
case	O
of	O
the	O
Cochran	B-General_Concept
–	I-General_Concept
Mantel	I-General_Concept
–	I-General_Concept
Haenszel	I-General_Concept
test	I-General_Concept
;	O
it	O
is	O
equivalent	O
to	O
a	O
CMH	O
test	O
with	O
one	O
stratum	O
for	O
the	O
each	O
of	O
the	O
N	O
pairs	O
and	O
,	O
in	O
each	O
stratum	O
,	O
a	O
2x2	O
table	O
showing	O
the	O
paired	O
binary	O
responses	O
.	O
</s>
