[R] Regularized gamma function/ incomplete gamma function

Stefan Evert stefanML at collocations.de
Sat Dec 12 00:05:54 CET 2009


> I would be very grateful if you could help me with:
>
> Given the regularized gamma function Reg=int_0^r (x^(k-1)e^(-x))dx/ 
> int_0^Inf (x^(k-1)e^(-x))dx ; 0<r<Inf (which is eventually the ratio  
> of the
> Incomplete gamma function by the gamma function), does anyone know  
> of a package in R that would evaluate the derivative of the inverse  
> of Reg with respect to k?

This doesn't look pleasant at all:

	http://en.wikipedia.org/wiki/Incomplete_gamma_function#Derivatives

It appears to be quite difficult to compute the derivative of the  
incomplete gamma function itself -- I'm not aware of any R  
implementation -- and the derivative of the inverse may be even harder.

> I am aware that the function "Rgamma.inv" of the package "Zipfr"  
> evaluates the inverse
> of Reg and I'm wondering wether there is a function that would  
> evaluate the derivative of the inverse..

For all I know, the inverse is calculated by an (optimized) Newton- 
type search algorithm, so it's not very likely that its derivative can  
easily be worked out (based on the current implementation).

Best,
Stefan




More information about the R-help mailing list