Statalist


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

st: Fast calculation of a generalized hypergeometric probability


From   "Tiago V. Pereira" <[email protected]>
To   [email protected]
Subject   st: Fast calculation of a generalized hypergeometric probability
Date   Sun, 3 May 2009 22:57:16 -0300 (BRT)

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/



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