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 weighted Lindley distribution with parameters theta and alpha.
1 2 3 4 5 6 7 8 9 10 |
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. |
L, U |
interval which |
n |
number of observations. If |
mixture |
logical; If TRUE, (default), random deviates are generated from a two-component mixture of gamma distributions, otherwise from the quantile function. |
Probability density function
f( x\mid θ,α) =\frac{θ ^{α +1}}{≤ft( θ+α \right) Γ ≤ft( α \right) }x^{α -1}≤ft( 1+x\right)e^{-θ x} \label{density-weighted-lindley}
Cumulative distribution function
F(x\mid θ,α) =1 - \frac{≤ft( θ +α \right)Γ ≤ft( α,θ x\right) +≤ft( θ x\right) ^{α}e^{-θ x}}{≤ft( θ +α \right) Γ ≤ft( α \right) }
Quantile function
\code{does not have a closed mathematical expression}
Hazard rate function
h(x\mid θ,α) =\frac{θ ^{α +1}x^{α-1}≤ft( 1+x\right) e^{-θ x}}{≤ft( θ +α \right) Γ≤ft( α,θ x\right) +≤ft( θ x\right) ^{α }e^{-θ x}}
where Γ ≤ft(α,θ x\right) = \int_{θ x}^{∞}x^{α -1}e^{-x}dx is the upper incomplete gamma function.
Particular case: α=1 the one-parameter Lindley distribution.
dwlindley
gives the density, pwlindley
gives the distribution function, qwlindley
gives the quantile function, rwlindley
generates random deviates and hwlindley
gives the hazard rate function.
Invalid arguments will return an error message.
The uniroot
function with default arguments is used to find out the quantiles.
Josmar Mazucheli jmazucheli@gmail.com
Larissa B. Fernandes lbf.estatistica@gmail.com
[d-h-p-q-r]wlindley are calculated directly from the definitions. rwlindley
uses either a two-component mixture of the gamma distributions or the quantile function.
Al-Mutairi, D. K., Ghitany, M. E., Kundu, D., (2015). Inferences on stress-strength reliability from weighted Lindley distributions. Communications in Statistics - Theory and Methods, 44, (19), 4096-4113.
Bashir, S., Rasul, M., (2015). Some properties of the weighted Lindley distribution. EPRA Internation Journal of Economic and Business Review, 3, (8), 11-17.
Ghitany, M. E., Alqallaf, F., Al-Mutairi, D. K. and Husain, H. A., (2011). A two-parameter weighted Lindley distribution and its applications to survival data. Mathematics and Computers in Simulation, 81, (6), 1190-1201.
Mazucheli, J., Louzada, F., Ghitany, M. E., (2013). Comparison of estimation methods for the parameters of the weighted Lindley distribution. Applied Mathematics and Computation, 220, 463-471.
Mazucheli, J., Coelho-Barros, E. A. and Achcar, J. (2016). An alternative reparametrization on the weighted Lindley distribution. Pesquisa Operacional, (to appear).
lambertWm1
, uniroot
, DWLindley
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | set.seed(1)
x <- rwlindley(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, dwlindley(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)
pwlindley(q, theta = 1.5, alpha = 1.5, lower.tail = TRUE)
pwlindley(q, theta = 1.5, alpha = 1.5, lower.tail = FALSE)
qwlindley(p, theta = 1.5, alpha = 1.5, lower.tail = TRUE)
qwlindley(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, 'wlindley', start = list(theta = 0.1, alpha = 0.1))
plot(fit)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.