dgengamma(x, mu=0, sigma=1, Q, log = FALSE) pgengamma(q, mu=0, sigma=1, Q, lower.tail = TRUE, log.p = FALSE) qgengamma(p, mu=0, sigma=1, Q, lower.tail = TRUE, log.p = FALSE) rgengamma(n, mu=0, sigma=1, Q) Hgengamma(x, mu=0, sigma=1, Q) hgengamma(x, mu=0, sigma=1, Q)length(n) > 1, the length is
taken to be the number required.dlnorm, rather than the ``scale'' parameter
of the gamma distribution dgamma. Constrained to be
positive.
dgengamma gives the density, pgengamma gives the distribution
function, qgengamma gives the quantile function, rgengamma
generates random deviates, Hgengamma retuns the cumulative hazard
and hgengamma the hazard.
$$f(x | \mu, \sigma, Q) = \frac{|Q|(Q^{-2})^{Q^{-2}}}{\sigma x \Gamma(Q^{-2})} \exp(Q^{-2}(Qw - \exp(Qw)))$$
This parameterisation is preferred to the original parameterisation of
the generalized gamma by Stacy (1962) since it is more numerically
stable near to $Q=0$ (the log-normal distribution), and allows $Q<=0$. the="" original="" is="" available="" in="" this="" package="" as="" dgengamma.orig, for the sake of completion and
compatibility with other software - this is implicitly restricted to
Q>0 (or k>0 in the original notation). The parameters of
dgengamma and dgengamma.orig are related as
follows.=0$.>
dgengamma.orig(x, shape=shape, scale=scale, k=k) =
dgengamma(x, mu=log(scale) + log(k)/shape, sigma=1/(shape*sqrt(k)), Q=1/sqrt(k))
The generalized gamma distribution simplifies to the gamma, log-normal and Weibull distributions with the following parameterisations:
dgengamma(x, mu, sigma, Q=0) |
= |
dlnorm(x, mu, sigma) |
dgengamma(x, mu, sigma, Q=1) |
= |
dweibull(x, shape=1/sigma, scale=exp(mu)) |
dgengamma(x, mu, sigma, Q=sigma) |
= |
dgamma(x, shape=1/sigma^2, rate=exp(-mu) / sigma^2) |
dgengamma(x, mu, sigma, Q=0) |
GenF extends the
generalized gamma to four parameters.
Farewell, V. T. and Prentice, R. L. (1977). A study of distributional shape in life testing. Technometrics 19(1):69-75. Lawless, J. F. (1980). Inference in the generalized gamma and log gamma distributions. Technometrics 22(3):409-419.
Cox, C., Chu, H., Schneider, M. F. and Muñoz, A. (2007). Parametric survival analysis and taxonomy of hazard functions for the generalized gamma distribution. Statistics in Medicine 26:4252-4374
Stacy, E. W. (1962). A generalization of the gamma distribution. Annals of Mathematical Statistics 33:1187-92
GenGamma.orig, GenF,
Lognormal, GammaDist, Weibull.