# GENILindley: Generalized Inverse Lindley Distribution In LindleyR: The Lindley Distribution and Its Modifications

## Description

Density function, distribution function, quantile function, random number generation and hazard rate function for the generalized inverse Lindley distribution with parameters theta and alpha.

## Usage

 1 2 3 4 5 6 7 8 9 dgenilindley(x, theta, alpha, log = FALSE) pgenilindley(q, theta, alpha, lower.tail = TRUE, log.p = FALSE) qgenilindley(p, theta, alpha, lower.tail = TRUE, log.p = FALSE) rgenilindley(n, theta, alpha, mixture = TRUE) hgenilindley(x, theta, alpha, log = TRUE) 

## Arguments

 x, q vector of positive quantiles. theta, alpha positive parameters. log, log.p logical; If TRUE, probabilities p are given as log(p). lower.tail logical; If TRUE, (default), P(X ≤q x) are returned, otherwise P(X > x). p vector of probabilities. n number of observations. If length(n) > 1, the length is taken to be the number required. mixture logical; If TRUE, (default), random deviates are generated from a two-component mixture of generalized inverse gamma distributions, otherwise from the quantile function.

## Details

Probability density function

f(x\mid θ,α )=\frac{α θ ^{2}}{1+θ }≤ft( \frac{1+x^{α }}{x^{2α +1}}\right) e^{-\frac{θ }{x^{α }}}

Cumulative distribution function

F(x\mid θ,α )=≤ft( 1+\frac{θ }{≤ft( 1+θ \right) {x}^{α }}\right) e{{^{-{\frac{θ }{x^{α }}}}}}

Quantile function

Q(p\mid θ ,α) =≤ft( -1-\frac{1}{θ }-\frac{1}{θ }W_{-1}≤ft( -p≤ft( 1+θ \right) e{^{-(1+θ) }}\right) \right) ^{- \frac{1}{α }}

Hazard rate function

h(x\mid θ,α )={\frac{α {θ }^{2}≤ft( 1+{x}^{α}\right) e{{^{-{\frac{θ }{{x}^{α }}}}}}}{≤ft( 1+θ \right) {x}^{2α +1}≤ft[ 1-≤ft( 1+\frac{θ }{≤ft( 1+θ \right) {x}^{α }}\right) e{{^{-{\frac{θ }{x^{α }}}}}}\right] }}

where W_{-1} denotes the negative branch of the Lambert W function.

Particular case: α = 1 the inverse Lindley distribution.

## Value

dgenilindley gives the density, pgenilindley gives the distribution function, qgenilindley gives the quantile function, rgenilindley generates random deviates and hgenilindley gives the hazard rate function.

Invalid arguments will return an error message.

## Note

Barco et al. (2016) named the generalized inverse Lindley distribution as inverse power Lindley distribution.

## Author(s)

Josmar Mazucheli [email protected]

Larissa B. Fernandes [email protected]

## Source

[d-h-p-q-r]genilindley are calculated directly from the definitions. rgenilindley uses either a two-component mixture of generalized inverse gamma distributions or the quantile function.

## References

Barco, K. V. P., Mazucheli, J. and Janeiro, V. (2016). The inverse power Lindley distribution. Communications in Statistics - Simulation and Computation, (to appear).

Sharma, V. K., Singh, S. K., Singh, U., Merovci, F., (2015). The generalized inverse Lindley distribution: A new inverse statistical model for the study of upside-down bathtub data. Communication in Statistics - Theory and Methods, 0, 0, 0-0.

## See Also

lambertWm1.

## Examples

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 set.seed(1) x <- rgenilindley(n = 1000, theta = 10, alpha = 20, mixture = TRUE) R <- range(x) S <- seq(from = R[1], to = R[2], by = 0.01) plot(S, dgenilindley(S, theta = 10, alpha = 20), xlab = 'x', ylab = 'pdf') hist(x, prob = TRUE, main = '', add = TRUE) p <- seq(from = 0.1, to = 0.9, by = 0.1) q <- quantile(x, prob = p) pgenilindley(q, theta = 10, alpha = 20, lower.tail = TRUE) pgenilindley(q, theta = 10, alpha = 20, lower.tail = FALSE) qgenilindley(p, theta = 10, alpha = 20, lower.tail = TRUE) qgenilindley(p, theta = 10, alpha = 20, lower.tail = FALSE) library(fitdistrplus) fit <- fitdist(x, 'genilindley', start = list(theta = 10, alpha = 20)) plot(fit) 

LindleyR documentation built on May 29, 2017, 10:54 a.m.