McNemar-test

Install required packages

coin

McNemar-test

Using mcnemar.test()

      postFac
preFac no yes Sum
   no   3   5   8
   yes  6   6  12
   Sum  9  11  20

    McNemar's Chi-squared test

data:  cTab
McNemar's chi-squared = 0.090909, df = 1, p-value = 0.763

Using symmetry_test() from package coin


    Approximative General Symmetry Test

data:  response by
     conditions (preFac, postFac) 
     stratified by block
chi-squared = 0.090909, p-value = 1

Detach (automatically) loaded packages (if possible)

Get the article source from GitHub

R markdown - markdown - R code - all posts