rmutil (version 1.1.3)

Generalized Gamma: Generalized Gamma Distribution

Description

These functions provide information about the generalized gamma distribution with scale parameter equal to m, shape equal to s, and family parameter equal to f: density, cumulative distribution, quantiles, log hazard, and random generation.

The generalized gamma distribution has density $$ f(y) = \frac{\nu y^{\nu-1}} {(\mu/\sigma)^{\nu\sigma} Gamma(\sigma)} y^{\nu(\sigma-1)} \exp(-(y \sigma/\mu)^\nu)$$

where \(\mu\) is the scale parameter of the distribution, \(\sigma\) is the shape, and \(\nu\) is the family parameter.

\(\nu=1\) yields a gamma distribution, \(\sigma=1\) a Weibull distribution, and \(\sigma=\infty\) a log normal distribution.

Usage

dggamma(y, s, m, f, log=FALSE)
pggamma(q, s, m, f)
qggamma(p, s, m, f)
rggamma(n, s, m, f)

Arguments

y

vector of responses.

q

vector of quantiles.

p

vector of probabilities

n

number of values to generate

m

vector of location parameters.

s

vector of dispersion parameters.

f

vector of family parameters.

log

if TRUE, log probabilities are supplied.

See Also

dgamma for the gamma distribution, dweibull for the Weibull distribution, dlnorm for the log normal distribution.

Examples

Run this code
# NOT RUN {
dggamma(2, 5, 4, 2)
pggamma(2, 5, 4, 2)
qggamma(0.75, 5, 4, 2)
rggamma(10, 5, 4, 2)
# }

Run the code above in your browser using DataCamp Workspace