46 McNemar’s Test

McNemar’s test is based on the (chi-square) test of independence (or association), but is used in a repeated measures or within-subjects design.

We’ll go over a brief example so you’re familiar with this test, but in practice I don’t see this statistic often so we won’t go over it any further than this.

1. Look at the Data

For example, suppose we’re working with the Australian Generic Political Party (AGPP) and your job is to find out how effective AGPP political advertisements are. You gather 100 people and ask them to watch the AGPP ads. You ask participants before and after viewing ads whether they intend to vote for the AGPP.

This data comes from lsj-data. Open data from your Data Library in “lsj-data.” Select and open “agpp.” This dataset indicates the ID number of the participant and whether they would vote for AGPP before and after viewing the ads.

Data Set-Up

Our data set-up for McNemar’s test is pretty simple. We just need two columns of nominal data, with one row per participant and each column being the same variable at two different time points – in our case, we have response_before and response_after as the same variable being measured at two different timepoints.

Specify the Hypotheses

Given you want to see if the AGPP political advertisements are, you want to see if participants are more likely to vote for AGPP after viewing the advertisement. Therefore, the alternative hypothesis is that intentions to vote for the AGPP don’t match the expected frequency of intentions to vote.

2. Check Assumptions

You came here because you violated the assumptions of the test of independence’s assumption of independence. You should have a within-subjects design to perform this test. We meet this assumption so we can move on!

3. Perform the Test

  1. Go to the Analyses tab, click the Frequencies button, and choose “Paired Samples – McNemar test.”
  2. Move response_before into rows and response_after into columns. Note that the placement in rows or columns doesn’t really matter.
  3. Under the Statistics tab, select under Tests.
  4. Optionally, you can request under to show the row and column percentages.

4. Interpret Results

The first table shows us our observed frequencies.

The second table gives us our results. Our p-value is less than .05 so we can reject the null hypothesis that the observed frequencies match our expected frequencies. Unfortunately, looking at our table it also shows that the ads had a negative effect: people were less likely to vote AGPP after seeing the ads.

Write Up the Results in APA Style

We can write up our results in APA something like this:

McNemar’s test indicated that support for AGPP changed from before to after reviewing the AGPP advertisement, (1) = 13.33, p < .001. Most participants continued to not vote for AGPP after the ad (n = 65) and a few continued to vote for AGPP after the ad (n = 5). However, many participants who originally stated they would vote for AGPP changed to no longer voting for AGPP after the ad (n = 25); only five people who originally would not vote for AGPP changed to vote for AGPP after the ad.

License

Icon for the Creative Commons Attribution-ShareAlike 4.0 International License

Research Methods and Statistics with jamovi Copyright © 2024 by Catharine Ortner, Thompson Rivers University Open Press is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License, except where otherwise noted.

Share This Book