Search code examples
rdistributiongamma-distribution

normalized lower incomplete gamma in R


I am attempting to reproduce results of this paper in R, but I am stuck on two parts.

  1. plotting the normalized lower incomplete gamma functions enter image description here

  2. calculating the loss function

enter image description here

This problem would be solved if there existed a function in R that computed the normalized lower incomplete gamma function. So my question is, how can I calculated the normalized lower incomplete gamma function


Solution

  • pgamma is the normalized lower incomplete gamma function, see ?pgamma:

    pgamma is closely related to the incomplete gamma function. As defined by Abramowitz and Stegun 6.5.1 (and by ‘Numerical Recipes’) this is

    P(a,x) = 1/Gamma(a) integral_0^x t^(a-1) exp(-t) dt