[R] Regularized gamma function/ incomplete gamma function

Stefan Evert stefanML at collocations.de
Sun Dec 13 12:56:28 CET 2009


>   Indeed, it seems that the author of zipfR has neither been aware
>   that the (scaled / aka regularized) incomplete gamma (and beta,
>   for that matter!) functions have been part of R all along.
>   ...
>   ... well , inspecting his code reveals he did know it.
>   But why then on earth provide all the new <foo>gamma()
>   functions, all trivially defined via pgamma(), qgamma() and
>   gamma() ??

Simply so I could write down the original formulas in terms of  
incomplete upper/lower gamma functions, rather than having to wrap my  
head around how they relate to pgamma() each time.  Perhaps overkill  
to export all these functions and document them, I must agree.

> I'm a bit shocked by the lack of basic calculus knowledge both
> in your question and even more in the answers.

No, we haven't forgotten our basic calculus, or at least not that  
part.   I'm afraid you didn't read the OP's question carefully  
enough.  Amy needs the derivative of the regularised Gamma function  
with respect to the shape parameter (given there as "k"), rather than  
with respect to x.

Wish there was such an easy solution, because that would allow us to  
calculate gradients for faster parameter estimation in zipfR.

Best wishes,
Stefan




More information about the R-help mailing list