Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Fast calculation of a generalized hypergeometric probability


From   Jeph Herrin <junk@spandrel.net>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Fast calculation of a generalized hypergeometric probability
Date   Mon, 04 May 2009 21:01:34 -0400

Not very clear on your problem, but have you tried to apply
the function -hypergeometricp- ?



Tiago V. Pereira wrote:
Dear all,

I have a set of large 2x3 tables and I would like to compute the
probability of each configuration (given fixed margins).

Using

exp(lnfactorial(k)-lnfactorial(n)-lnfactorial(k-n)) for a combinatorial
function k out of n works fine for small tables, but overflow for large
numbers.


Since there is a great chance that you know shortcuts for the
generalized hypergeometric probability, I would appreciate any advice.

All the best,

Tiago




*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index