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.
The generalized gamma distribution has two shape parameters,
d>0
p>0
a>0
f(x;a,d,p)=
| |||||||
\Gamma(d/p) |
,
\Gamma( ⋅ )
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);
\gamma( ⋅ )
P( ⋅ , ⋅ )
The quantile function can be found by noting that
F(x;a,d,p)=G((x/a)p)
G
\alpha=d/p
\beta=1
F
F-1(q;a,d,p)=a ⋅ [G-1(q)]1/p,
G-1(q)
\alpha=d/p,\beta=1
d=p
p=1
p=d=1
p=d=2
p=2
d=2m
p=2
d=1
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]
If X has a generalized gamma distribution as above, then[3]
\operatorname{E}(Xr)=ar
| ||||||
|
.
Denote GG(a,d,p) as the generalized gamma distribution of parameters a, d, p.Then, given
c
\alpha
f\simGG(a,d,p)
cf\simGG(ca,d,p)
f\alpha\sim
| |||||
GG\left(a | , |
p | |
\alpha |
\right)
If
f1
f2
\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
| |||||||||||||
|
+\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}
\psi( ⋅ )
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 |
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