[R] Exact test in nxm contingency table

Thomas Lumley tlumley at u.washington.edu
Wed Sep 17 22:00:10 CEST 2008


On Wed, 17 Sep 2008, Peter Dalgaard wrote:
>fisher.test(...., simulate.p.value=TRUE)  might be more direct. Also
>works for chisq.test().
>
>And, contrary to popular belief,  fisher.test() does work for larger
>than2x2 tables, although you may run into space/time limitations.

The 'exact' test computations do suffer from roundoff error if your tables 
are too large. I think we saw a 3x11 table that had problems.

It would be nice to see if the original Mehta & Patel algorithm TOMS 643 
is more accurate, but I haven't been able to find code: it seems to have 
been replaced everywhere by the faster Clarkson et al code.

 	-thomas

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle



More information about the R-help mailing list