[R] Low level algorithm conrol in Fisher's exact test

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Nov 10 11:17:17 CET 2005


On Thu, 10 Nov 2005, Kihwang Lee wrote:

> Hi folks,
>
> Forgive me if this question is a trivial issue.
>
> I was doing a series of Fishers' exact test using the fisher.test
> function in stats package.
> Since the counts I have were quite large (c(64, 3070, 2868, 4961135)), R
> suggested me to use
> *other algorithms* for the test which can be specified through the
> 'control' argument of the
> fisher.test function as I understood.

Not that I can reproduce.  You cannot change the algorithm that way.

> But where can I find other algorithms that I can use? I hoped I could 
> find relevant information in the manual but could not.
>
> Can anybody help me out there?

What *exactly* did you see?  I get

> fisher.test(matrix(c(64, 3070, 2868, 4961135), 2))
         FEXACT error 40.
Out of workspace.

> fisher.test(matrix(c(64, 3070, 2868, 4961135), 2), workspace=20e6)
         FEXACT error 501.
The hash table key cannot be computed because the largest key
is larger than the largest representable int.
The algorithm cannot proceed.
Reduce the workspace size or use another algorithm.

Where does it say anything about using control= ?


AFAIK R does not have a means of doing Fisher's test on such a table, and 
it really does not make much statistical sense to do so.  With such 
numbers, the null hypothesis is almost always rejected (try the chisq 
test), even for negligible dependence.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list