Bowker-test

Install required packages

coin

Bowker test

Using mcnemar.test()

     plac
drug   lo med  hi Sum
  lo   14   7   9  30
  med   5  26  19  50
  hi    1   7  12  20
  Sum  20  40  40 100

mcnemar.test() automatically runs the Bowker test for tables with more than 2 rows/columns


    McNemar's Chi-squared test

data:  cTab
McNemar's chi-squared = 12.272, df = 3, p-value = 0.006508

Using symmetry_test() from package coin


    Approximative General Symmetry Test

data:  response by
     conditions (drug, plac) 
     stratified by block
chi-squared = 12.139, p-value = 0.0017

Detach (automatically) loaded packages (if possible)

Get the article source from GitHub

R markdown - markdown - R code - all posts