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:
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?
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 mestatistic=1667.912 df=5 p=.000000
. With the frequencies*100 plus all zeros changed to 1s, SPSS gave mestatistic=1664.932 df=6 p=.000000
. $\endgroup$