# Generalized gamma distribution

Jump to navigation Jump to search
Parameters Probability density function $a>0$ (scale), $d>0,p>0$ $x\;\in \;(0,\,\infty )$ ${\frac {p/a^{d}}{\Gamma (d/p)}}x^{d-1}e^{-(x/a)^{p}}$ ${\frac {\gamma (d/p,(x/a)^{p})}{\Gamma (d/p)}}$ $a{\frac {\Gamma ((d+1)/p)}{\Gamma (d/p)}}$ $a\left({\frac {d-1}{p}}\right)^{\frac {1}{p}}\mathrm {for} \;d>1,\mathrm {otherwise} \;0$ $a^{2}\left({\frac {\Gamma ((d+2)/p)}{\Gamma (d/p)}}-\left({\frac {\Gamma ((d+1)/p)}{\Gamma (d/p)}}\right)^{2}\right)$ $\ln {\frac {a\Gamma (d/p)}{p}}+{\frac {d}{p}}+\left({\frac {1}{p}}-{\frac {d}{p}}\right)\psi \left({\frac {d}{p}}\right)$ The generalized gamma distribution is a continuous probability distribution with three parameters. It is a generalization of the two-parameter gamma distribution. Since many distributions commonly used for parametric models in survival analysis (such as the Exponential distribution, the Weibull distribution and the Gamma distribution) are special cases of the generalized gamma, it is sometimes used to determine which parametric model is appropriate for a given set of data. Another example is the half-normal distribution.

## Characteristics

The generalized gamma has three parameters: $a>0$ , $d>0$ , and $p>0$ . For non-negative x, the probability density function of the generalized gamma is

$f(x;a,d,p)={\frac {(p/a^{d})x^{d-1}e^{-(x/a)^{p}}}{\Gamma (d/p)}},$ where $\Gamma (\cdot )$ denotes the gamma function.

$F(x;a,d,p)={\frac {\gamma (d/p,(x/a)^{p})}{\Gamma (d/p)}},$ where $\gamma (\cdot )$ denotes the lower incomplete gamma function.

If $d=p$ then the generalized gamma distribution becomes the Weibull distribution. Alternatively, if $p=1$ the generalised gamma becomes the gamma distribution.

Alternative parameterisations of this distribution are sometimes used; for example with the substitution α  =   d/p. In addition, a shift parameter can be added, so the domain of x starts at some value other than zero. If the restrictions on the signs of a, d and p are also lifted (but α = d/p remains positive), this gives a distribution called the Amoroso distribution, after the Italian mathematician and economist Luigi Amoroso who described it in 1925.

## Moments

If X has a generalized gamma distribution as above, then

$\operatorname {E} (X^{r})=a^{r}{\frac {\Gamma ({\frac {d+r}{p}})}{\Gamma ({\frac {d}{p}})}}.$ ## Kullback-Leibler divergence

If $f_{1}$ and $f_{2}$ are the probability density functions of two generalized gamma distributions, then their Kullback-Leibler divergence is given by

{\begin{aligned}D_{KL}(f_{1}\parallel f_{2})&=\int _{0}^{\infty }f_{1}(x;a_{1},d_{1},p_{1})\,\ln {\frac {f_{1}(x;a_{1},d_{1},p_{1})}{f_{2}(x;a_{2},d_{2},p_{2})}}\,dx\\&=\ln {\frac {p_{1}\,a_{2}^{d_{2}}\,\Gamma \left(d_{2}/p_{2}\right)}{p_{2}\,a_{1}^{d_{1}}\,\Gamma \left(d_{1}/p_{1}\right)}}+\left[{\frac {\psi \left(d_{1}/p_{1}\right)}{p_{1}}}+\ln a_{1}\right](d_{1}-d_{2})+{\frac {\Gamma {\bigl (}(d_{1}+p_{2})/p_{1}{\bigr )}}{\Gamma \left(d_{1}/p_{1}\right)}}\left({\frac {a_{1}}{a_{2}}}\right)^{p_{2}}-{\frac {d_{1}}{p_{1}}}\end{aligned}} where $\psi (\cdot )$ is the digamma function.

## Software implementation

In R implemented in the package flexsurv, function dgengamma, with different parametrisation: $\mu =\ln a+{\frac {\ln d-\ln p}{p}}$ , $\sigma ={\frac {1}{\sqrt {pd}}}$ , $Q={\sqrt {\frac {p}{d}}}$ .