Fisher’s Exact Test
by Michael Boedigheimer
29 Dec 2008
(Updated 17 Jan 2012)
Hypergeometric cumulative distribution (left, right and two-tailed) including permutation testing.
|
Watch this File
|
| File Information |
| Description |
Matlab's implementation of Fisher's exact test only supports one-tailed tests. Other implementations on the file exchange are reportedly buggy and are far too slow for problems I'm working on. This implementation does 2.5e6 one or two-tailed tests per second and is ideally suited for genome-wide association studies or other large problems where 100s of samples and 10s to 100s of 1000s of tests are being performed.
It has been verified correct for samp les sizes up to 100 and spot checked beyond that up to 1000s of samples.
|
| MATLAB release |
MATLAB 7.11 (2010b)
|
| Other requirements |
Requires a large amount of memory for genome wide assocation studies (>=4Gb) |
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Updates |
| 23 Dec 2011 |
Improved documentation and help. Improved performance for single tests. |
| 17 Jan 2012 |
Now can handle large number of observations in a single trial with minimal footprint.
If X = [7.9 7.911; 8 8]*1e6
fexact(x(1),sum(x(:)),x(1)+x(3),x(1)+x(2)) returns 0.0498 for a two-sided test; |
| 17 Jan 2012 |
Has been updated to work with a large sample size if performing a single test. |
|
Contact us at files@mathworks.com