Description Usage Arguments Details Value Author(s) Source References See Also Examples
Density function, distribution function, quantile function, random number generation and hazard rate function for the power Lindley distribution with parameters theta and alpha.
1 2 3 4 5 6 7 8 9 |
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 |
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{α θ ^{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.
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.
Josmar Mazucheli jmazucheli@gmail.com
Larissa B. Fernandes lbf.estatistica@gmail.com
[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.
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.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.