2

After propensity score matching, we can assess balance between matched cohorts using McNemar test. I wonder why it is usually significant even in case of zero events on both sides. I saw prior question but this didn't answer my query. Code obtained from here

x<-matrix(c(1,1,85,85),2,2); mcnemar.test(x)

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

x<-matrix(c(0,0,86,86),2,2); mcnemar.test(x)

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

This is the data that I am trying to do McNemar test for it. I have many outcomes and Null hypothesis would be "No difference between both groups" while the alternative hypothesis would be that difference exists

enter image description here
Am I doing something wrong?

Any advice will be greatly appreciated.

  • mcnamar test is just a binomial test over the two diagonal cells of the matrix (upper right and lower left). the other ones are ignored. – carlo Sep 26 '20 at 09:31
  • @carlo So, its use here is correct and I can use it in such low events number? – Mohamed Rahouma Sep 26 '20 at 09:37
  • 1
    dunno. if i knew I would have posted a full answer. the point anyway is what is the actual hypothesis you want to test – carlo Sep 26 '20 at 11:48
  • 2
    Always try to post the data, not just a code which creates the data. I.e., in your example, show the frequncy tables themselves. – ttnphns Sep 26 '20 at 13:16
  • @ttnphns Thx for your advices. I added the outcomes table and stated the null hypothesis. Upvoted your comment. – Mohamed Rahouma Sep 26 '20 at 13:43
  • 1
    Read about what this test tests. Carlo above has actually answered you. – ttnphns Sep 26 '20 at 13:55

1 Answers1

1

So you have 86 matched pairs of values judging by your opening remarks. In that case the table you need is one which shows the diagonal as being those pairs which were both positive and those which were both negative. The off-diagonal cells are those where one pair member is positive and one negative. As it stands you are saying that there are 172 pairs, which seems to contradict the table you show and there are 96 pairs which agreed and 86 which differed, all in the same direction.

I think you have misunderstood what it going on here.

mdewey
  • 17,806