gengammaUC {VGAM} | R Documentation |
Density, distribution function, quantile function and random
generation for the generalized gamma distribution with
scale parameter scale
,
and parameters d
and k
.
dgengamma(x, scale = 1, d = 1, k = 1, log = FALSE) pgengamma(q, scale = 1, d = 1, k = 1) qgengamma(p, scale = 1, d = 1, k = 1) rgengamma(n, scale = 1, d = 1, k = 1)
x, q |
vector of quantiles. |
p |
vector of probabilities. |
n |
number of observations. Positive integer of length 1. |
scale |
the (positive) scale parameter b. |
d, k |
the (positive) parameters d and k. |
log |
Logical.
If |
See gengamma
, the VGAM family function
for estimating the generalized gamma distribution
by maximum likelihood estimation,
for formulae and other details.
Apart from n
, all the above arguments may be vectors and
are recyled to the appropriate length if necessary.
dgengamma
gives the density,
pgengamma
gives the distribution function,
qgengamma
gives the quantile function, and
rgengamma
generates random deviates.
T. W. Yee
Stacy, E. W. and Mihram, G. A. (1965) Parameter estimation for a generalized gamma distribution. Technometrics, 7, 349–358.
## Not run: x = seq(0, 14, by = 0.01); d = 1.5; Scale = 2; k = 6 plot(x, dgengamma(x, Scale, d, k), type = "l", col = "blue", ylim = 0:1, main = "Blue is density, red is cumulative distribution function", sub = "Purple are 5,10,...,95 percentiles", las = 1, ylab = "") abline(h = 0, col = "blue", lty = 2) lines(qgengamma(seq(0.05,0.95,by = 0.05), Scale, d, k), dgengamma(qgengamma(seq(0.05,0.95,by = 0.05), Scale, d, k), Scale, d, k), col = "purple", lty = 3, type = "h") lines(x, pgengamma(x, Scale, d, k), type = "l", col = "red") abline(h = 0, lty = 2) ## End(Not run)