Learn R Programming

reliaR (version 0.2)

Loggamma: The log-gamma(LG) distribution

Description

Density, distribution function, quantile function and random generation for the log-gamma(LG) distribution with parameters alpha and lambda.

Usage

dlog.gamma(x, alpha, lambda, log = FALSE)
plog.gamma(q, alpha, lambda, lower.tail = TRUE, log.p = FALSE)
qlog.gamma(p, alpha, lambda, lower.tail = TRUE, log.p = FALSE)
rlog.gamma(n, alpha, lambda)

Value

dlog.gamma gives the density,

plog.gamma gives the distribution function,

qlog.gamma gives the quantile function, and

rlog.gamma generates random deviates.

Arguments

x,q

vector of quantiles.

p

vector of probabilities.

n

number of observations. If length(n) > 1, the length is taken to be the number required.

alpha

parameter.

lambda

parameter.

log, log.p

logical; if TRUE, probabilities p are given as log(p).

lower.tail

logical; if TRUE (default), probabilities are \(P[X \le x]\) otherwise, \(P[X > x]\).

Details

The log-gamma(LG) distribution has density $$f(x; \alpha, \lambda) = \alpha \lambda \exp\left\{\lambda x\right\} \exp\left\{-\alpha \exp{\lambda x}\right\};\; (\alpha, \lambda) > 0, x > 0$$

where \(\alpha\) and \(\lambda\) are the parameters, respectively.

References

Klugman, S., Panjer, H. and Willmot, G. (2004). Loss Models: From Data to Decisions, 2nd ed., New York, Wiley.

Lawless, J. F., (2003). Statistical Models and Methods for Lifetime Data, 2nd ed., John Wiley and Sons, New York.

See Also

.Random.seed about random number; slog.gamma for ExpExt survival / hazard etc. functions

Examples

Run this code
## Load data sets
data(conductors)
## Maximum Likelihood(ML) Estimates of alpha & lambda for the data(conductors)
## Estimates of alpha & lambda using 'maxLik' package
## alpha.est = 0.0088741, lambda.est = 0.6059935
dlog.gamma(conductors, 0.0088741, 0.6059935, log = FALSE)
plog.gamma(conductors, 0.0088741, 0.6059935, lower.tail = TRUE, log.p = FALSE)
qlog.gamma(0.25, 0.0088741, 0.6059935, lower.tail=TRUE, log.p = FALSE)
rlog.gamma(30, 0.0088741, 0.6059935)

Run the code above in your browser using DataLab