1
$\begingroup$

I need to test the difference between pre- and post- intervention over a 4-grades parameter computed on 57 samples. The contingency matrix on which I need to compute a McNemar test for paired data (McNemar-Bowker test) is the following:

Matrix_for_McNemar_test

I obtain McNemar's chi-squared = NaN and p-value = NA as a result when I perform mcnemar.test(matrix) in R, and I know this is due to cells [1,3] and [3,1], in this case, both containing a zero.
My question is: is there any alternative test to assess the pre/post intervention difference of these samples, or any correct way to transform these data, so to make possible to perform the McNemar-Bowker test?

$\endgroup$
  • $\begingroup$ This answer mentions the exact version of McNemar-Bowker. I've never tried it, so can't speak. $\endgroup$ – ttnphns Jul 21 '16 at 15:46
  • $\begingroup$ Note that McNemar-Bowker ignores pairs of symmetric cells with both frequencies zero. Such pairs seem to be not problematic. The problem is when one or both symmetric cells have nonzero but low frequency, such as when the sum therein is less that 10, - then exact test would be necessary. (Have read it somewhere but don't remember where.) $\endgroup$ – ttnphns Jul 21 '16 at 16:10
  • $\begingroup$ It seems to me that the problem is represented by symmetrical cells [1,3] and [3,1], both containing a zero. I say this because, if I attempt to perform the test on the same matrix, but with values multiplied by e.g. 120, the result is still NA in spite of all symmetric cells' sums being way higher than 10 (except [1,3]+[3,1]=0). If I instead modify that matrix containing much larger counts by simply putting a 1 or any other non-zero value in [3,1] or in [1,3], it returns an interpretable result, with a chi-squared value, degrees of freedom and the corresponding p-value. $\endgroup$ – Franz Jul 22 '16 at 10:13
  • 1
    $\begingroup$ Franz, I'm not R user. I wonder why it returns NA. With your table shown, SPSS returns statistic=16.679 df=5 p=.005150. (This doesn't necessarily means the asymptotic p-value is unbiased with the not large sample.) With all the frequencies*100 it returns me statistic=1667.912 df=5 p=.000000. With the frequencies*100 plus all zeros changed to 1s, SPSS gave me statistic=1664.932 df=6 p=.000000. $\endgroup$ – ttnphns Jul 22 '16 at 10:45
  • $\begingroup$ Thanks, it is useful to know that using SPSS, a result is returned. However I don't understand why different software behave differently with regards to the same test. I will keep investigating, but I also thought that maybe a Wilcoxon signed-rank test for paired data could represent a correct alternative test to extrapolate whether the distribution of individuals in the different classes significantly changes between pre- and post-intervention... $\endgroup$ – Franz Jul 22 '16 at 13:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.