[R] Fisher's Test 5x4 table

peter dalgaard pdalgd at gmail.com
Mon Aug 31 09:00:03 CEST 2015


> On 30 Aug 2015, at 13:54 , paul brett <brettpaul16 at gmail.com> wrote:
> 
> Fisher's Exact Test for Count Data with simulated p-value (based on 1e+07
> replicates)
> 
> data:  Trapz
> p-value = 1e-07
> alternative hypothesis: two.sided
> 
> 
> Dispite these chages, the changes equations is not giving me the results
> for the calculations. The changes I have made seem to satisfy what is in
> the details section on R, and I don't have the issue of workspace in R.
> What I do to get the results of the fisher test?
> Is there something simple that I am missing?

The theory?

There is nothing more to Fisher's test than the calculation of the probability of obtaining a table as or less (im-)probable as the one observed. This is the p-value. You have done 10 million simulations and not found a single table that is less likely than the one observed. Hence, the p-value is 1/10 000 001 = ca. 1e-7, counting in the observed table. 

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-help mailing list