Re: [S] reasonable p-values for Fisher exact's test - WAS strange ...

Patrick Connolly (PConnolly@grunt.marc.cri.nz)
Wed, 25 Mar 1998 13:17:52 +1200 (NZST)


According to Charles C. Berry:
|>
|> Before this thread enters an infinite loop, a few observations:
|>
|> First, class(fisher.test(etc) ) == "htest"

.......

|> If this is a problem, then dhyper() can be used in 2 x 2 tables. It
|> seems to generate results that are close to machine accuracy.

Maybe there isn't a problem, but it is a little strange that the
values are different depending on the machine used to do the
calculations.

SunOS didn't give the same "errors" with the first quoted values, but
it does for others.

I compared the results with different values of j in

fisher.test(matrix(c(1, 1, j, j)

Below is a table of the pvalues so calculated using Unix and Windows NT.

Ver 3.4 Solaris 2.6 4.0 WindowsNT 3.5
j pval j pval
[1,] 30 0.9999990 [1,] 30 0.9999961
[2,] 31 0.9999948 [2,] 31 0.9999992
[3,] 32 0.9999756 [3,] 32 1.0000068
[4,] 33 1.0000257 [4,] 33 1.0000074
[5,] 34 1.0000346 [5,] 34 0.9999897
[6,] 35 0.9999983 [6,] 35 0.9999876
[7,] 36 0.9999815 [7,] 36 0.9999937
[8,] 37 0.9999994 [8,] 37 1.0000155
[9,] 38 0.9999797 [9,] 38 0.9999804
[10,] 39 1.0000098 [10,] 39 1.0000068
[11,] 40 1.0000135 [11,] 40 0.9999837
[12,] 41 1.0000100 [12,] 41 1.0000182
[13,] 42 1.0000026 [13,] 42 0.9999958
[14,] 43 0.9999614 [14,] 43 1.0000155
[15,] 44 0.9999966 [15,] 44 0.9999744
[16,] 45 1.0000168 [16,] 45 0.9999946
[17,] 46 0.9999988 [17,] 46 1.0000225
[18,] 47 1.0000271 [18,] 47 0.9999973
[19,] 48 0.9999408 [19,] 48 0.9999950
[20,] 49 1.0000226 [20,] 49 1.0000004
[21,] 50 0.9999748 [21,] 50 1.0000061

[48,] 77 1.0000079 [48,] 77 1.0000390
[49,] 78 1.0000833 [49,] 78 1.0000079
[50,] 79 0.9998999 [50,] 79 0.9999616
[51,] 80 1.0000826 [51,] 80 0.9999764

Is there a fundamental difference in the way different machines so
such calculations?

Cheers
Patrick
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news