Description Usage Arguments Details Value Note Author(s) Source References See Also Examples
Density function, distribution function, quantile function, random number generation and hazard rate function for the exponentiated Lindley distribution with parameters theta and alpha.
1 2 3 4 5 6 7 8 9 | dexplindley(x, theta, alpha, log = FALSE)
pexplindley(q, theta, alpha, lower.tail = TRUE, log.p = FALSE)
qexplindley(p, theta, alpha, lower.tail = TRUE, log.p = FALSE)
rexplindley(n, theta, alpha)
hexplindley(x, theta, alpha, log = FALSE)
|
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 |
Probability density function
f(x\mid θ,α )=\frac{α θ ^{2}}{(1+θ )} (1+x)e^{-θ x}≤ft[ 1-≤ft( 1+\frac{θ x}{1+θ }\right) e^{-θ x}\right] ^{α -1}
Cumulative distribution function
F(x\mid θ,α )=≤ft[ 1-≤ft( 1+\frac{θ x}{1+θ }\right) e^{-θ x}\right] ^{α }
Quantile function
Q(p\mid θ ,α )=-1-\frac{1}{θ }-{\frac{1}{θ }}W_{-1}{≤ft( (p^{\frac{1}{α }}-1)≤ft( 1+θ \right) e{^{-≤ft( 1+θ \right) }}\right) }
Hazard rate function
h(x\mid θ ,α )={\frac{α {θ }^{2}≤ft( 1+x\right) {{e}^{-θ x}}≤ft[ 1-≤ft( 1+{\frac{θ x}{1+θ }}\right) e{^{-θ x}}\right] ^{α -1}}{≤ft( 1+θ \right) ≤ft\{ 1-≤ft[ 1-≤ft( 1+\frac{θ x}{1+θ }\right) e^{-θ x}\right] ^{α}\right\} }}
where W_{-1} denotes the negative branch of the Lambert W function.
Particular case: α = 1 the one-parameter Lindley distribution.
dexplindley gives the density, pexplindley gives the distribution function, qexplindley gives the quantile function, rexplindley generates random deviates and hexplindley gives the hazard rate function.
Invalid arguments will return an error message.
Nadarajah et al. (2011) named the exponentiated Lindley distribution as generalized Lindley distribution.
Josmar Mazucheli jmazucheli@gmail.com
Larissa B. Fernandes lbf.estatistica@gmail.com
[d-h-p-q-r]explindley are calculated directly from the definitions. rexplindley uses the quantile function.
Nadarajah, S., Bakouch, H. S., Tahmasbi, R., (2011). A generalized Lindley distribution. Sankhya B, 73, (2), 331-359.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | set.seed(1)
x <- rexplindley(n = 1000, theta = 1.5, alpha = 1.5)
R <- range(x)
S <- seq(from = R[1], to = R[2], by = 0.1)
plot(S, dexplindley(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)
pexplindley(q, theta = 1.5, alpha = 1.5, lower.tail = TRUE)
pexplindley(q, theta = 1.5, alpha = 1.5, lower.tail = FALSE)
qexplindley(p, theta = 1.5, alpha = 1.5, lower.tail = TRUE)
qexplindley(p, theta = 1.5, alpha = 1.5, lower.tail = FALSE)
## Relief times data (from Nadarajah et al., 2011)
data(relieftimes)
library(fitdistrplus)
fit <- fitdist(relieftimes, 'explindley', start = list(theta = 1.5, alpha = 1.5))
plot(fit)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.