{"issue":{"created_at":"2011-11-22T02:46:51Z","state":"open","updated_at":"2011-11-22T02:46:51Z","user":{"gravatar_id":"ad13088a623822caf74e635a68a55eae","id":440735,"url":"https://api.github.com/users/josef-pkt","avatar_url":"https://secure.gravatar.com/avatar/ad13088a623822caf74e635a68a55eae?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"josef-pkt"},"comments":0,"body":"in loglike for example for poisson the use of factorial limits the largest possible observation, \r\nIn other cases there are numerical precision problems with factorial (but I don't know or remember a case in statsmodels)\r\n\r\n(I had some simulated cases where Poisson fit ended with an exception)\r\n\r\n```\r\n>>> from scipy.misc import factorial\r\n>>> factorial(200)\r\narray(inf)\r\n>>> factorial(100)\r\narray(9.3326215443944151e+157)\r\n>>> factorial(50)\r\narray(3.0414093201713381e+64)\r\n\r\n>>> np.log(factorial(50))\r\n148.47776695177302\r\n>>> np.log(factorial(200))\r\ninf\r\n>>> np.log(factorial(100))\r\n363.73937555556347\r\n\r\n>>> from scipy.special import gammaln\r\n>>> gammaln(50+1)\r\n148.47776695177302\r\n>>> gammaln(200+1)\r\n863.23198719240554\r\n>>> gammaln(100+1)\r\n363.73937555556347\r\n```","assignee":null,"id":2313887,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"number":110,"labels":[{"name":"comp-discrete","color":"ededed","url":"https://api.github.com/repos/statsmodels/statsmodels/labels/comp-discrete"}],"title":"use gammaln instead of log(factorial(.))","closed_at":null,"html_url":"https://github.com/statsmodels/statsmodels/issues/110","url":"https://api.github.com/repos/statsmodels/statsmodels/issues/110","milestone":null},"action":"opened"}