Extended Lindley Distribution

Share:

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
dextlindley(x, theta, alpha, beta, log = FALSE)

pextlindley(q, theta, alpha, beta, lower.tail = TRUE, log.p = FALSE)

qextlindley(p, theta, alpha, beta, lower.tail = TRUE, log.p = FALSE,
  L = 1e-04, U = 50)

rextlindley(n, theta, alpha, beta, L = 1e-04, U = 50)

hextlindley(x, theta, alpha, beta, log = TRUE)

Arguments

x, q

vector of positive quantiles.

theta

positive parameter.

alpha

\rm I\!R^{-}\cup (0,1).

beta

greater than or equal to zero.

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.

L, U

interval which uniroot searches for a root (quantile), L = 1e-4 and U = 50 are the default values.

n

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

Details

Probability density function

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

Cumulative distribution function

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

Quantile function

\code{does not have a closed mathematical expression}

Hazard rate function

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

Particular cases: (α = 1, β = 1) the one-parameter Lindley distribution, (α = 0, β = 1) the exponential distribution and for α = 0 the Weibull distribution. See Bakouch et al. (2012) for other particular cases.

Value

dextlindley gives the density, pextlindley gives the distribution function, qextlindley gives the quantile function, rextlindley generates random deviates and hextlindley gives the hazard rate function.

Invalid arguments will return an error message.

Note

The uniroot function with default arguments is used to find out the quantiles.

Author(s)

Josmar Mazucheli jmazucheli@gmail.com

Larissa B. Fernandes lbf.estatistica@gmail.com

Source

[d-h-p-q-r]extlindley are calculated directly from the definitions. rextlindley uses the quantile function.

References

Bakouch, H. S., Al-Zahrani, B. M., Al-Shomrani, A. A., Marchi, V. A. A., Louzada, F., (2012). An extended Lindley distribution. Journal of the Korean Statistical Society, 41, (1), 75-85.

See Also

lambertWm1, uniroot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
set.seed(1)
x <- rextlindley(n = 1000, theta = 5.0, alpha = -1.0, beta = 5.0)
R <- range(x)
S <- seq(from = R[1], to = R[2], by = 0.01)
plot(S, dextlindley(S, theta = 5.0, alpha = -1.0, beta = 5.0), 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)
pextlindley(q, theta = 5.0, alpha = -1.0, beta = 5.0, lower.tail = TRUE)
pextlindley(q, theta = 5.0, alpha = -1.0, beta = 5.0, lower.tail = FALSE)
qextlindley(p, theta = 5.0, alpha = -1.0, beta = 5.0, lower.tail = TRUE)
qextlindley(p, theta = 5.0, alpha = -1.0, beta = 5.0, lower.tail = FALSE)

library(fitdistrplus)
fit <- fitdist(x, 'extlindley', start = list(theta = 5.0, alpha = -1.0, beta = 5.0))
plot(fit)