The log-gamma distribution
Density, distribution function and gradient of density for the
log-gamma distribution.
These are implemented in C
for speed and care is taken that the correct results are provided for
values of NA
, NaN
, Inf
, -Inf
or just
extremely small or large values.
The log-gamma is a flexible location-scale distribution on the real line with an extra parameter, λ. For λ = 0 the distribution equals the normal or Gaussian distribution, and for λ equal to 1 and -1, the Gumbel minimum and maximum distributions are obtained.
plgamma(q, lambda, lower.tail = TRUE) dlgamma(x, lambda, log = FALSE) glgamma(x, lambda)
x,q |
numeric vector of quantiles. |
lambda |
numerical scalar |
lower.tail |
logical; if |
log |
logical; if |
If λ < 0 the distribution is right skew, if λ = 0 the distribution is symmetric (and equals the normal distribution), and if λ > 0 the distribution is left skew.
The log-gamma distribution function is defined as ... pending.
The density and gradient of the density are defined as... pending.
plgamma
gives the distribution function, dlgamma
gives the density and glgamma
gives the gradient of the
density.
Rune Haubo B Christensen
Genter, F. C. and Farewell, V. T. (1985) Goodness-of-link testing in ordinal regression models. The Canadian Journal of Statistics, 13(1), 37-44.
## Illustrating the link to other distribution functions: x <- -5:5 plgamma(x, lambda = 0) == pnorm(x) all.equal(plgamma(x, lambda = -1), pgumbel(x)) ## TRUE, but: plgamma(x, lambda = -1) == pgumbel(x) plgamma(x, lambda = 1) == pgumbel(x, max = FALSE) dlgamma(x, lambda = 0) == dnorm(x) dlgamma(x, lambda = -1) == dgumbel(x) dlgamma(x, lambda = 1) == dgumbel(x, max = FALSE) glgamma(x, lambda = 0) == gnorm(x) all.equal(glgamma(x, lambda = -1), ggumbel(x)) ## TRUE, but: glgamma(x, lambda = -1) == ggumbel(x) all.equal(glgamma(x, lambda = 1), ggumbel(x, max = FALSE)) ## TRUE, but: glgamma(x, lambda = 1) == ggumbel(x, max = FALSE) ## There is a loss of accuracy, but the difference is very small: glgamma(x, lambda = 1) - ggumbel(x, max = FALSE) ## More examples: x <- -5:5 plgamma(x, lambda = .5) dlgamma(x, lambda = .5) glgamma(x, lambda = .5)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.