Code covered by the BSD License  

Highlights from
MyFisher23

5.0

5.0 | 3 ratings Rate this file 9 Downloads (last 30 days) File Size: 2.83 KB File ID: #15399

MyFisher23

by Giuseppe Cardillo

 

22 Jun 2007 (Updated 23 Dec 2009)

A very compact routine for Fisher's exact test on 2x3 contingency table

| Watch this File

File Information
Description

Fisher's exact test of 2x3 contingency tables permits calculation of precise probabilities in situation where, as a consequence of small cell frequencies, the much more rapid normal approximation and chi-square calculations are liable to be inaccurate. The Fisher's exact test involves the computations of several factorials to obtain the probability of the observed and each of the more extreme tables. Factorials growth quickly, so it's necessary use logarithms of factorials. This computations is very easy in Matlab because x!=gamma(x+1) and log(x!)=gammaln(x+1). This
function is now fully vectorized to speed up the computation.

You can visit my homepage http://home.tele2.it/cardillo
My profile on XING http://www.xing.com/go/invita/13675097
My profile on LinkedIN http://it.linkedin.com/in/giuseppecardillo

MATLAB release MATLAB 7.3 (R2006b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
07 May 2008 Shilpa Gandhi

Fast, provides good output display. Exactly what I needed. Thanks!

06 Apr 2011 Mike

Excellent, Accurate.

09 Dec 2011 Emmanuel

Works well. Thanks.

Please login to add a comment or rating.
Updates
26 Jun 2007

Bug fixed in 1-tailed P calculation

02 Jul 2007

More compact and vectorized function

01 May 2008

waitbar added

18 Jun 2008

Speeding up using gammaln function and vectorization.

12 Nov 2008

Changes in help section

25 Nov 2008

little improvements in tables enumeration

23 Oct 2009

Actually, the function also computes the mid-P correction to make the test less conservative.

23 Oct 2009

Actually, the function also computes the mid-P correction to make the test less conservative.

23 Dec 2009

Changes in description

Tag Activity for this File
Tag Applied By Date/Time
statistics Giuseppe Cardillo 22 Oct 2008 09:16:52
probability Giuseppe Cardillo 22 Oct 2008 09:16:52
fishers exact test 2x3 matrix Giuseppe Cardillo 22 Oct 2008 09:16:52
statistics Cristina McIntire 12 Nov 2008 14:02:19
probability Cristina McIntire 12 Nov 2008 14:02:19

Contact us at files@mathworks.com