
Dear all, I am brand new to this mailing list so I apologize in advance for the naivety of my request. I am looking for an implementation of the Fisher exact test in C/C++, and was somehow hoping to find one in boost. I have looked at the documentation of boost and and found many statistical tools, but not the one I am looking for. The closest I got was a discussion in the mailing archive in 2008 on the use of the hypergeometric distribution to perform such implementation Was any progress made since then ? Could I now get the cdf, pmf and sf from an hypergeometric distribution ? or even better a Fisher exact test directly ? Any help will be welcome Thanks Cheers ! Jean-Baptiste

I am brand new to this mailing list so I apologize in advance for the naivety of my request.
I am looking for an implementation of the Fisher exact test in C/C++, and was somehow hoping to find one in boost.
I have looked at the documentation of boost and and found many statistical tools, but not the one I am looking for. The closest I got was a discussion in the mailing archive in 2008 on the use of the hypergeometric distribution to perform such implementation Was any progress made since then ? Could I now get the cdf, pmf and sf from an hypergeometric distribution ? or even better a Fisher exact test directly ?
There's no direct test (but if you'd like to submit one as an example that would be great!), the hypergeometric is in Boost.Math now: http://www.boost.org/doc/libs/1_43_0/libs/math/doc/sf_and_dist/html/math_too... and I believe supports all the operations you need to conduct the test. HTH, John.

Thanks John, I will try to perform the implementation myself using the updated hypergeometric. Has anyone pointers to efficient algorithm for two-sided 2x2 Fisher exact (or Barnard) test, able to deal with mix of small and large cell counts ( 0 and ~ 10,000) ? Large cell counts are typically a problem for the classical factorial version. Thanks Cheers ! Jean-Baptiste On Jul 22, 2010, at 11:03 AM, John Maddock wrote:
I am brand new to this mailing list so I apologize in advance for the naivety of my request.
I am looking for an implementation of the Fisher exact test in C/C+ +, and was somehow hoping to find one in boost.
I have looked at the documentation of boost and and found many statistical tools, but not the one I am looking for. The closest I got was a discussion in the mailing archive in 2008 on the use of the hypergeometric distribution to perform such implementation Was any progress made since then ? Could I now get the cdf, pmf and sf from an hypergeometric distribution ? or even better a Fisher exact test directly ?
There's no direct test (but if you'd like to submit one as an example that would be great!), the hypergeometric is in Boost.Math now: http://www.boost.org/doc/libs/1_43_0/libs/math/doc/sf_and_dist/html/math_too... and I believe supports all the operations you need to conduct the test.
HTH, John. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

I will try to perform the implementation myself using the updated hypergeometric.
Has anyone pointers to efficient algorithm for two-sided 2x2 Fisher exact (or Barnard) test, able to deal with mix of small and large cell counts ( 0 and ~ 10,000) ? Large cell counts are typically a problem for the classical factorial version.
Our hypergeometric implementation will cope with the large factorials OK, but you're correct that it may be slow for N > 170. John.
participants (2)
-
Jean-Baptiste Cazier
-
John Maddock