0

I am trying to do a Fishers exact test on the following dataset.

structure(list(found = c(17L, 21L, 18L), not.found = c(19L, 15L, 
18L)), row.names = c("Gravel", "Grass", "Multi"), class = "data.frame")

Three options where left up to choice, an animals where either found or not. Naturally, the probability between these options should theorethically be 0.33. So it want to test for this probabilty

In the explanation of the test in R, it gives the option 'Hybrid':

hybrid
a logical. Only used for larger than 2×2 tables, in which cases it indicates whether the exact probabilities (default) or a hybrid approximation thereof should be computed.

I feel like this option would solve my issue, but I cannot seem to find how to implement it.

For no, my code looks like this:

fisher.test(data, hybrid = )

I would really like to have some help with filling in the 'hybrid' part, or some indication of another solution. Thanks!

  • 1
    Since the `hybrid` argument is logical it can either be `TRUE` or `FALSE`. I am not sure this will solve your problem though. It sounds like you want to test your data not just against a null of independence, but a particular kind of independence where each cell has a probability of 1/6. Is that right? – DaveArmstrong May 17 '23 at 09:52
  • Yes that's exactly right! Do you have other suggestions for doing that? :) – Djingleberg May 17 '23 at 09:57
  • Could you just do a chi-square goodness of fit test for your observed values against an expected distribution where all value are n/6? – DaveArmstrong May 17 '23 at 10:18
  • Thanks, but does that give the same indication? If i try ```chisq.test(subfound, p = rep(0.1666,6))``` That should do it right? – Djingleberg May 17 '23 at 10:26
  • 2
    That should give you the right answer, I think. I get a p-value of .9531. – DaveArmstrong May 17 '23 at 10:31
  • Yep, that's the same for me. Thanks for your help Dave! – Djingleberg May 22 '23 at 08:23

0 Answers0