Skip to content
Prev 106602 / 398525 Next

McNemar test in R & SPSS

Peter,

Thanks for your reply. To perform the analysis in R, I used the table 
format suggested in the book by Everitt & Hothorn, whereas in SPSS the 
analysis was performed directly from the 2 variables, rather than using 
count data.

There is still something I don't understand  - I tried to replicate the 
syntax from your e-mail but my computer just kept waiting - what am I still 
doing wrong?


  mctest <- as.table(matrix(c(128,29,331,430), ncol =2, dimnames = 
list(group=c("preMHT","postMHT"), assault=c("yes","no"))))
 > d <- read.table(stdin())
0: mcnemar.test(as.matrix(d),correct=F)
1:

Thanks again

Bob
At 10:52 PM 26/12/2006 +0100, Peter Dalgaard wrote: