In this tutorial


in Example 12.8.1 I understand the result of the test

## McNemar's chi-squared = 12.033, df = 1, p-value = 0.0005226

But they conclude:

And in fact, it looks like the ads had a negative effect: people were less likely to vote AGPP after seeing the ads

Why do they conclude that? How can we know if the effect of the ads (in this case) is positive or negative?

  • $\begingroup$ What are the counts of response_before for yes and response_after for no and yes? $\endgroup$ Commented Jan 30, 2021 at 12:31
  • $\begingroup$ response_before_yes_response_after_yes=5; response_before_yes_response_after_no=25; response_berfore_no_response_after_yes=5; response_before_no_response_after_no=65; therefore after the ads the response is 5 in both cases, there is no negative effect $\endgroup$
    – Ana
    Commented Jan 30, 2021 at 13:14

1 Answer 1


Your data should be something like this:

tab = as.table(rbind(c(65,5),c(25,5)))

colnames(tab) = c("no","yes")
rownames(tab) = c("no","yes")

names(dimnames(tab)) <- c("before", "after")
before no yes
   no  65   5
   yes 25   5

And the test goes:


    McNemar's Chi-squared test with continuity correction

data:  tab
McNemar's chi-squared = 12.033, df = 1, p-value = 0.0005226

You can interpret it as, before seeing the ad, 30% responded yes:

 no yes 
 70  30

After seeing the ad, only 10% responded yes:

 no yes 
 90  10 

Hence it has a negative effect.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.