Solved – Fisher’s exact test in 2×3 contingency table

chi-squared-testcount-datafishers-exact-testmcnemar-testr

I have a dataset with birds that were exposed to pesticides. The summary of this data looks like:

         Total number tested
         Age1   Age2   Age3    Total
Male      28     34     60      122
Female    16     28     50      94
Total     44     62     110     216

Total Number Tested Positive            
         Age1   Age2   Age3    Total
Male      15     23     34      72
Female    11     25     35      71
Total     26     48     69      143

The questions I'm trying to answer are:

  1. Is age class2 more exposed to pesticides than the other 2 age
    classes?
  2. Are males more exposed than females?

It seems like it should be a simple fisher test, but I'm not sure if I'm applying the right test and interpreting it right. Which test would it be most appropriate to apply to answer those questions? Is there a way to include all 3 age classes at once, or I should do it pairwise?

I tried this:

Hypothesis Age1 < Age2

fisher.test(rbind(c(26,44-26), c(48,62-48)), alternative="less")

Fisher's Exact Test for Count Data

data:  rbind(c(26, 44 - 26), c(48, 62 - 48))
p-value = 0.03549
alternative hypothesis: true odds ratio is less than 1
95 percent confidence interval:
0.0000000 0.9344918
sample estimates:
odds ratio 
0.4249067 

p<0.05 => reject the null hypothesis, so this means there is no difference between Age1 and Age2 or am I getting it wrong?

Best Answer

I'm not sure if this is the best or even the "right" way of solving this problem but personally I would approach this as follows.

First I would tackle each question separately. Lets take question (1). I would re-tabulate the data as follows:

                 Age1   Age2  Age3  Total
Test Positive     26     48     69  143
Test Negative     18     14     41   73
Total             44     62    110

I would then use a chi-square test to see if there is any evidence for heterogeneity between the groups.

> m <- matrix( c(26,48,69,18,14,41), byrow =  T, nrow = 2)
> chisq.test(m )

    Pearson's Chi-squared test

data:  m
X-squared = 5.0748, df = 2, p-value = 0.07907

I.e. there is some weak evidence to say that exposure is not equally distributed across age.

Will be interested to see what others suggest as a solution to this question.

Related Question