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

Peter Dalgaard p.dalgaard at biostat.ku.dk
Thu Nov 10 11:50:36 CET 2005


Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:

> 
> 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.

I have to disagree a little here. If the count in the smaller group
had been smaller we would have been well inside the scope of exact
testing, e.g.


> fisher.test(matrix(c(4, 3070, 2868, 4961135), 2),or=1+1e-15)

        Fisher's Exact Test for Count Data

data:  matrix(c(4, 3070, 2868, 4961135), 2)
p-value = 0.105
alternative hypothesis: true odds ratio is not equal to 1
95 percent confidence interval:
 0.6132965 5.7830438
sample estimates:
odds ratio
  2.253824

(And the workspace issue still applies, hence the or= fiddle)

A professional statistician would know enough to switch to the
binomial (or Poisson) approximation, but others might need help.

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907




More information about the R-help mailing list