Question about Fisher's Exact Test

murp

New Member
#1
Hi everyone- new to posting here. I am wondering if I can get some feedback on simple code for a Fisher's test, as I am pretty new to R. I am inputting a 3x2 table, may be easier just to see the table/code below.

The output I get looks pretty different to me than the output I got for a 2x2 value (where p=0.002, also gave confidence interval and odds ratio, whereas the 3x2 table results do not). Am I doing something wrong with the code? Or is it suggesting adding something more to the test?

Any suggestions/advice is great appreciated!! (also, all #s in the table are counts)

> all <- matrix(c(108, 37, 21, 1, 10, 11), nrow = 3,
+ dimnames = list(Bract = c("Condition1", "Condition2", "Condition3"),
+ Behaviour = c("Behaviour1", "Behaviour2")))

> all
Behaviour1 Behaviour2
1 Condition1 108 1
2 Condition2 37 10
3 Condition3 21 11

> fisher.test(all)

Fisher's Exact Test for Count Data

data: all
p-value = 1.957e-08
alternative hypothesis: two.sided
 

hlsmith

Less is more. Stay pure. Stay poor.
#2
Guessing it is just testing whether at least one group differs from the others. Probably need to go back and perform pairwise comparisons of the groups to discern where the difference(s) are, plus you will need to correct your alpha (level of significance) to account for false discovery rate related to multiplicity (multiple comparisons).
 

murp

New Member
#3
Guessing it is just testing whether at least one group differs from the others. Probably need to go back and perform pairwise comparisons of the groups to discern where the difference(s) are, plus you will need to correct your alpha (level of significance) to account for false discovery rate related to multiplicity (multiple comparisons).
Thanks- would you suggest the pairwise.t.test command?
Such as > pairwise.t.test(behaviour1, behaviour2)? (or would I put the conditions here?)

Real beginner here...thanks again.