Logistic Regression: A Self-learning Text, Third Edition (Statistics in the Health Sciences)

(vip2019) #1
Stratum 1

Compute Mantel – Haenszel c^2 and MOR

Stratum 2 Stratum 100

D


E E


D


E WY


E XZ


E E E E E E E E
D 101 D 101 D 011 D 011


D 101 D 011 D 101 D 011


WX Y Z

w^2 MH¼


ðXYÞ^2
XþY

;df¼ 1

McNemar’s test

McNemar’s test¼MH test for
pair-matching


MORd ¼X=Y, 95% CI:


MOR expd




 196


ffiffiffiffiffiffiffiffiffiffi
1

1
Y

q 

One way is to carry out aMantel–Haenszel chi-
square testfor association based on the 100
strata and to compute aMantel–Haenszel odds
ratio, usually denoted as MOR, as a summary
odds ratio that adjusts for the matched vari-
ables. This can be carried out using any stan-
dard computer program for stratified analysis
e.g., PROC FREQUENCY, in SAS.

The other method of analysis, which is equiva-
lent to the above stratified analysis approach,
is to summarize the data in a single table, as
shown here. In this table, matched pairs are
counted once, so that the total number of
matched pairs is 100.

As described earlier, the quantityWrepresents
the number of matched pairs in which both the
case and the control are exposed. Similarly,X,
Y, andZare defined as previously.

Using the above table, the test for an overall
effect of exposure, controlling for the matching
variables, can be carried out using a chi-square
statistic equal to the square of the difference
X–Ydivided by the sum ofXandY. This chi-
square statistic has one degree of freedom in
large samples and is calledMcNemar’s test.

It can be shown that McNemar’s test statistic is
exactly equal to the Mantel–Haenszel (MH)
chi-square statistic obtained by looking at the
data in 100 strata. Moreover, the MOR esti-
mate can be calculated asX/Y, and a 95% con-
fidence interval for the MOR can also be
computed (shown on the left).

As an example of McNemar’s test, supposeW
equals 30,Xequals 30,Y equals 10, andZ
equals 30, as shown in the table here.

Then based on these data, the McNemar test
statistic is computed as the square of 30 minus
10 divided by 30 plus 10, which equals 400 over
40, which equals 10.

EXAMPLE
D
E E

D

E W¼ 30 Y¼ 10
E X¼ 30 Z¼ 30
D
E E

D

E 30 10
E 30 30

w^2 MH¼
ð 30  10 Þ^2
30 þ 10
¼
400
40
¼ 10 : 0

396 11. Analysis of Matched Data Using Logistic Regression

Free download pdf