McNemar test  

	McNemar's Chi-squared test

data:  purity$r1 and purity$r2
McNemar's chi-squared = 1.1429, df = 1, p-value = 0.285


	Mantel-Haenszel chi-squared test without continuity
	correction

data:  xtabs(~proc + r + batch, data = purity2)
Mantel-Haenszel X-squared = 1.1429, df = 1, p-value = 0.285
alternative hypothesis: true common odds ratio is not equal to 1
95 percent confidence interval:
 0.6032467 5.3709368
sample estimates:
common odds ratio 
              1.8 


 Fake comparisons of McNemar and Pearson  
   b
a     0   1
  0 100  50
  1  50  25

	Pearson's Chi-squared test

data:  tab
X-squared = 0, df = 1, p-value = 1


	McNemar's Chi-squared test

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

   b
a     0   1
  0 100  50
  1  50   0

	Pearson's Chi-squared test

data:  tab
X-squared = 22.222, df = 1, p-value = 2.428e-06


	McNemar's Chi-squared test

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

   b
a     0   1
  0 200  50
  1 100  25

	Pearson's Chi-squared test

data:  tab
X-squared = 0, df = 1, p-value = 1


	McNemar's Chi-squared test

data:  tab
McNemar's chi-squared = 16.667, df = 1, p-value = 4.456e-05


 Poisson regression model  

 Poisson regression model with offset  
Analysis of Deviance Table

Model: poisson, link: log

Response: falls

Terms added sequentially (first to last)


              Df Deviance Resid. Df Resid. Dev
NULL                             11     17.849
factor(month) 11   17.849         0      0.000

 Chi-square approach  

	Chi-squared test for given probabilities

data:  falls$falls
X-squared = 17.692, df = 11, p-value = 0.089