Skip to content
Prev 106601 / 398525 Next

McNemar test in R & SPSS

Bob Green wrote:
Well, you can't expect R to give the correct result if you feed it the 
wrong matrix, can you?
0:          0       1

1: 0       311     20

2: 1       119     9

3:
X0 X1

0 311 20

1 119  9
McNemar's Chi-squared test

data:  as.matrix(d) 

McNemar's chi-squared = 70.5108, df = 1, p-value < 2.2e-16
McNemar's Chi-squared test with continuity correction

data:  as.matrix(d) 

McNemar's chi-squared = 69.0935, df = 1, p-value < 2.2e-16