Multiple Paired Binary Variables
3b. The post-hoc test: Dunn or McNemar
On the previous page we found out there are differences in proportions of success. Now we would like to know which ones are then different. We had four cinemas, so we can do 6 different comparisons: Munt vs. Movies, Munt vs. Tuschin, Munt vs. Arena, etc. So we have six pairwise comparisons to do. However for each of these six tests we have a 'risk' of making the wrong decision if we use the usual 5% threshold. This means in this case we have a .26 (26%) chance that one of our six decisions is actually wrong. Many authors therefor suggest to adjust the results to counter this, known as adjustments. There are many different methods to adjust for the multiple testing, but probably the most common and straightforward one is Bonferroni.
The actual test to be used for these pairwise comparisons are either McNemar test (equal to Cochran's test for k=2), or a Dunn test.
In the example the pairwise post-hoc Dunn test with Bonferroni adjustments showed to be only significant for Munt vs. Arena (p = .024) and Munt vs. Movies (p < .001). We can add this to our report.
Cochran's Q test indicated that there are differences between the proportions among the four options of visited cinemas, χ2(3, N = 150) = 19.38, p < .001. A pairwise post-hoc Dunn test with Bonferroni adjustments was only significant for Munt vs. Arena (p = .024) and Munt vs. Movies (p < .001).
Click here to see how to perform a pairwise post-hoc test with SPSS, R (Studio), Excel, or Python.
with SPSS
Dunn's test
Note: Video starts with Cochran's Q test, but then goes into Dunn's test at 2:40
McNemar test
with R (Studio)
Dunn's test
McNemar test
with Excel
Dunn's test
McNemar test
Google adds