Re: [R] Fast version of Fisher's Exact Test

From: Stefan Evert <stefanML_at_COLLOCATIONS.DE>
Date: Tue, 12 Apr 2011 16:14:47 +0200

> Is anyone aware of a fast way of doing fisher's exact test for a series of 2
> x 2 tables in R? The fisher.test is really slow if n1=1000 and n2 = 1000.

If you don't require exact two-sided p-values (determined according to a likelihood criterion as in fisher.test), you can use the vectorised fisher.pval() function from the 'corpora' package.

The function is just a wrapper around the hypergeometric distribution; it doesn't compute confidence intervals, which are much more difficult to obtain.

Best,
Stefan



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 12 Apr 2011 - 16:12:47 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 12 Apr 2011 - 16:30:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive