Salomon Minkin wrote:
I'm running Version 6.2 on Unix.
I'm surprised that I'm getting zero p-values when I'm running the
Fisher exact test on some 3 x 2 tables. Here are two examples:
fisher.test(matrix(c(0,1,2,0,0,3),nrow=2))
Fisher's exact test
data: matrix(c(0, 1, 2, 0, 0 ,3), nrow = 2)
p-value = 0
alternative hypothesis: two.sided
fisher.test(matrix(c(0,5,3,1,0,1),nrwo=2))
Fisher's exact test
data: matrix(c(0, 5, 3, 1, 0 ,1), nrow = 2)
p-value = 0
alternative hypothesis: two.sided
Clearly, there is a positive probability of observing these particular
tables keeping the margins fixed. According to my hand calculations,
the probability of observing the first table is 0.067, and for the
second table
the probability is 0.033.
Why do I get a p-value of zero?
In R, I get your hand-calculated answers. Not sure how it is different
in S-PLUS.
R> fisher.test(matrix(c(0,1,2,0,0,3),nrow=2))
Fisher's Exact Test for Count Data
data: matrix(c(0, 1, 2, 0, 0, 3), nrow = 2)
p-value = 0.06667
alternative hypothesis: two.sided
R> fisher.test(matrix(c(0,5,3,1,0,1),nrow=2))
Fisher's Exact Test for Count Data
data: matrix(c(0, 5, 3, 1, 0, 1), nrow = 2)
p-value = 0.03333
alternative hypothesis: two.sided
|