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
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