PLindley: Power Lindley Distribution

Description Usage Arguments Details Value Author(s) Source References See Also Examples

Description

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

Usage

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

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

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

rplindley(n, theta, alpha, mixture = TRUE)

hplindley(x, theta, alpha, log = FALSE)

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

Details

Probability density function

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

Cumulative distribution function

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

Quantile function

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

Hazard rate function

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

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

Particular case: α = 1 the one-parameter Lindley distribution.

Value

dplindley gives the density, pplindley gives the distribution function, qplindley gives the quantile function, rplindley generates random deviates and hplindley 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]plindley are calculated directly from the definitions. rplindley uses either a two-component mixture of gamma distributions or the quantile function.

References

Ghitany, M. E., Al-Mutairi, D. K., Balakrishnan, N. and Al-Enezi, L. J., (2013). Power Lindley distribution and associated inference. Computational Statistics and Data Analysis, 64, 20-33.

Mazucheli, J., Ghitany, M. E. and Louzada, F., (2013). Power Lindley distribution: Diferent methods of estimation and their applications to survival times data. Journal of Applied Statistical Science, 21, (2), 135-144.

See Also

lambertWm1, DPLindley.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
set.seed(1)
x <- rplindley(n = 1000, theta = 1.5, alpha = 1.5, mixture = TRUE)
R <- range(x)
S <- seq(from = R[1], to = R[2], by = 0.1)
plot(S, dplindley(S, theta = 1.5, alpha = 1.5), 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)
pplindley(q, theta = 1.5, alpha = 1.5, lower.tail = TRUE)
pplindley(q, theta = 1.5, alpha = 1.5, lower.tail = FALSE)
qplindley(p, theta = 1.5, alpha = 1.5, lower.tail = TRUE)
qplindley(p, theta = 1.5, alpha = 1.5, lower.tail = FALSE)

## carbon fibers data (from Ghitany et al., 2013)
data(carbonfibers)
library(fitdistrplus)
fit <- fitdist(carbonfibers, 'plindley', start = list(theta = 0.1, alpha = 0.1))
plot(fit)

LindleyR documentation built on May 1, 2019, 8:05 p.m.