[R] problem with fisher.test

Marc Schwartz marc_schwartz at comcast.net
Mon Apr 28 17:28:59 CEST 2008


More than likely.

Take a look at the 'workspace' argument in ?fisher.test and review the 
second paragraph in Details:

"For 2 by 2 cases, p-values are obtained directly using the (central or 
non-central) hypergeometric distribution. Otherwise, computations are 
based on a C version of the FORTRAN subroutine FEXACT which implements 
the network developed by Mehta and Patel (1986) and improved by 
Clarkson, Fan and Joe (1993). The FORTRAN code can be obtained from 
http://www.netlib.org/toms/643. Note this fails (with an error message) 
when the entries of the table are too large. (It transposes the table if 
necessary so it has no more rows than columns. One constraint is that 
the product of the row marginals be less than 2^31 - 1.)"


HTH,

Marc Schwartz


Dr. Jeff Miller wrote:
> I posted this last night but I think I figured out the problem.
> 
> I checked on the underlying equation for the Fisher Exact Test for tables
> greater than 2X2.  It looks like I have an insane amount of factorials to be
> multiplied. 
> 
> Is that problem?  Is it an overflow issue?
> 
> Jeff
> 
>  
> 
> Last night�s post:
> 
>  
> 
> I just a ran a fisher.test on a 9x5 table and received the following message
> 
> Error in fisher.test(apaslg.t) : FEXACT error 30.
> 
> Stack length exceeded in f3xact.
> 
> This problem should not occur.
> 
> I agree. The problem should not occur.
> 
> I did some searching but only found other reports of the problem.
> 
> Does anyone know of a fix?  
> 
>  
> 
> Jeff



More information about the R-help mailing list