Inverse Lindley Distribution

Share:

Description

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

Usage

1
2
3
4
5
6
7
8
9
dilindley(x, theta, log = FALSE)

pilindley(q, theta, lower.tail = TRUE, log.p = FALSE)

qilindley(p, theta, lower.tail = TRUE, log.p = FALSE)

rilindley(n, theta, mixture = TRUE)

hilindley(x, theta, log = FALSE)

Arguments

x, q

vector of positive quantiles.

theta

positive parameter.

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 inverse-gamma distributions, otherwise from the quantile function.

Details

Probability density function

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

Cumulative distribution function

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

Quantile function

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

Hazard rate function

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

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

Value

dilindley gives the density, pilindley gives the distribution function, qilindley gives the quantile function, rilindley generates random deviates and hilindley gives the hazard rate function.

Invalid arguments will return an error message.

Author(s)

Josmar Mazucheli jmazucheli@gmail.com

Larissa B. Fernandes lbf.estatistica@gmail.com

Source

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

References

Sharma, V. K., Singh, S. K., Singh, U., Agiwal, V., (2015). The inverse Lindley distribution: a stress-strength reliability model with application to head and neck cancer data. Journal of Industrial and Production Engineering, 32, (3), 162-173.

See Also

lambertWm1, rinvgamma.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
x <- seq(from = 0.1, to = 3, by = 0.05)
plot(x, dilindley(x, theta = 1.0), xlab = 'x', ylab = 'pdf')

p <- seq(from = 0.1, to = 0.9, by = 0.1)
q <- quantile(x, prob = p)
pilindley(q, theta = 1.5, lower.tail = TRUE)
pilindley(q, theta = 1.5, lower.tail = FALSE)
qilindley(p, theta = 1.5, lower.tail = TRUE)
qilindley(p, theta = 1.5, lower.tail = FALSE)

set.seed(1)
x <- rilindley(n = 100, theta = 1.0)
library(fitdistrplus)
fit <- fitdist(x, 'ilindley', start = list(theta = 1.0))
plot(fit)