[R] Fishers exact test at < 2.2e-16

Ben Bolker bolker at ufl.edu
Thu Dec 17 15:04:10 CET 2009


Søren Faurby <soren.faurby <at> biology.au.dk> writes:

> 
> In an effort to select the most appropriate number of clusters in a
> mixture analysis I am comparing the expected and actual membership of
> individuals in various clusters using the Fisher?s exact test. I aim
> for the model with the lowest possible p-value, but I frequently get
> p-values below 2.2e-16 and therefore does not get exact p-values with
> standard Fisher?s exact tests in R.
> 

  The p<2.2e-16 is a printing issue, not a precision issue.

> ff = fisher.test(dat3, workspace=30000000)
> ff

	Fisher's Exact Test for Count Data

data:  dat3 
p-value < 2.2e-16
alternative hypothesis: two.sided 

> str(ff)
List of 4
 $ p.value    : num 5.88e-58
 $ alternative: chr "two.sided"
 $ method     : chr "Fisher's Exact Test for Count Data"
 $ data.name  : chr "dat3"
 - attr(*, "class")= chr "htest"

So just use ff$p.value




More information about the R-help mailing list