Generalized gamma distribution explained

The generalized gamma distribution is a continuous probability distribution with two shape parameters (and a scale parameter). It is a generalization of the gamma distribution which has one shape parameter (and a scale parameter). 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.[1] Another example is the half-normal distribution.

Characteristics

The generalized gamma distribution has two shape parameters,

d>0

and

p>0

, and a scale parameter,

a>0

. For non-negative x from a generalized gamma distribution, the probability density function is[2]

f(x;a,d,p)=

(p/ad)xd-1
-(x/a)p
e
\Gamma(d/p)

,

where

\Gamma()

denotes the gamma function.

The cumulative distribution function is

F(x;a,d,p)=

\gamma(d/p,(x/a)p)
\Gamma(d/p)

,orP\left(

d
p

,\left(

x
a

\right)p\right);

where

\gamma()

denotes the lower incomplete gamma function, and

P(,)

denotes the regularized lower incomplete gamma function.

The quantile function can be found by noting that

F(x;a,d,p)=G((x/a)p)

where

G

is the cumulative distribution function of the gamma distribution with parameters

\alpha=d/p

and

\beta=1

. The quantile function is then given by inverting

F

using known relations about inverse of composite functions, yielding:

F-1(q;a,d,p)=a[G-1(q)]1/p,

with

G-1(q)

being the quantile function for a gamma distribution with

\alpha=d/p,\beta=1

.

Related distributions

d=p

then the generalized gamma distribution becomes the Weibull distribution.

p=1

the generalised gamma becomes the gamma distribution.

p=d=1

then it becomes the exponential distribution.

p=d=2

then it becomes the Rayleigh distribution.

p=2

and

d=2m

then it becomes the Nakagami distribution.

p=2

and

d=1

then it becomes a half-normal distribution.

Alternative parameterisations of this distribution are sometimes used; for example with the substitution α  =   d/p.[3] In addition, a shift parameter can be added, so the domain of x starts at some value other than zero.[3] 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.[4]

Moments

If X has a generalized gamma distribution as above, then[3]

\operatorname{E}(Xr)=ar

\Gamma
(d+r
p
)
\Gamma(
d
p
)

.

Properties

Denote GG(a,d,p) as the generalized gamma distribution of parameters a, d, p.Then, given

c

and

\alpha

two positive real numbers, if

f\simGG(a,d,p)

, then

cf\simGG(ca,d,p)

and

f\alpha\sim

\alpha,d
\alpha
GG\left(a,
p
\alpha

\right)

.

Kullback-Leibler divergence

If

f1

and

f2

are the probability density functions of two generalized gamma distributions, then their Kullback-Leibler divergence is given by

\begin{align} DKL(f1\parallelf2)&=

infty
\int
0

f1(x;a1,d1,p1)ln

f1(x;a1,d1,p1)
f2(x;a2,d2,p2)

dx\\ &=ln

p
d2
a
2
\Gamma\left(d2/p2\right)
1
p
d1
a
1
\Gamma\left(d1/p1\right)
2

+\left[

\psi\left(d1/p1\right)
p1

+lna1\right](d1-d2)+

\Gammal((d1+p2)/p1r)
\Gamma\left(d1/p1\right)

\left(

a1
a2
p2
\right)

-

d1
p1

\end{align}

where

\psi()

is the digamma function.[5]

Software implementation

In the R programming language, there are a few packages that include functions for fitting and generating generalized gamma distributions. The gamlss package in R allows for fitting and generating many different distribution families including generalized gamma (family=GG). Other options in R, implemented in the package flexsurv, include the function dgengamma, with parameterization:

\mu=lna+

lnd-lnp
p
,
\sigma=1
\sqrt{pd
},
Q=\sqrt{p
d
}, and in the package ggamma with parametrisation:

a=a

,

b=p

,

k=d/p

.

In the python programming language, it is implemented in the SciPy package, with parametrisation:

c=p

,

a=d/p

, and scale of 1.

See also

References

  1. Box-Steffensmeier, Janet M.; Jones, Bradford S. (2004) Event History Modeling: A Guide for Social Scientists. Cambridge University Press. (pp. 41-43)
  2. Stacy, E.W. (1962). "A Generalization of the Gamma Distribution." Annals of Mathematical Statistics 33(3): 1187-1192.
  3. Johnson, N.L.; Kotz, S; Balakrishnan, N. (1994) Continuous Univariate Distributions, Volume 1, 2nd Edition. Wiley. (Section 17.8.7)
  4. Gavin E. Crooks (2010), The Amoroso Distribution, Technical Note, Lawrence Berkeley National Laboratory.
  5. C. Bauckhage (2014), Computing the Kullback-Leibler Divergence between two Generalized Gamma Distributions, .