[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Fisher's exact P and -csi-
Garry Anderson <firstname.lastname@example.org> found the following bug:
> I am enquiring why the value of Fisher's exact P for a 2 x 2 table should
> decrease when there is a smaller sample size for each of the two samples
> and the two proportions remain at 100% and 0%?
> For example
> -csi 6 0 0 6,e-
> 1-sided Fisher's exact P = 0.0011
> 2-sided Fisher's exact P = 0.0022
> -csi 5 0 0 5,e-
> 1-sided Fisher's exact P = 0.0000
> 2-sided Fisher's exact P = 0.0000
> Any suggestions would be appreciated.
> (SPSS gives P=0.1 for the 3 0 0 3 combination)
> I am using Stata 8.2, 30 Jan 2004, ado 11 Mar 2004.
Al Feiveson also noted this was also a problem with -tabi-.
I have fixed this bug, and the fix will be out in the next executable
update. It was restricted to the Windows version of Stata.
The problem (if anyone cares) was a subtle one and restricted to
these extreme cases -- numbers can be held in a computer at higher
precision than they are stored at. Some compilers treated two numbers
differently, holding one at a higher precision than the other, when
the two numbers should have been exactly the same. Disaster
occurred when these were subtracted and a value of zero was not
. csi 5 0 0 5, e
1-sided Fisher's exact P = 0.0040
2-sided Fisher's exact P = 0.0079
. csi 3 0 0 3, e
1-sided Fisher's exact P = 0.0500
2-sided Fisher's exact P = 0.1000
. tabi 5 0 \ 0 5, exact
Fisher's exact = 0.008
1-sided Fisher's exact = 0.004
Hope that helps!
* For searches and help try: