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 transmuted Lindley distribution with parameters theta and alpha.
1 2 3 4 5 6 7 8 9 10 |
x, q |
vector of positive quantiles. |
theta |
positive parameter. |
alpha |
-1 ≤q α ≤q +1. |
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 |
Probability density function
f(x\mid θ ,α )={\frac{{θ }^{2}≤ft( 1+x\right) e{^{-θ x}}}{1+θ }≤ft[ 1-α +2α ≤ft( 1+{\frac{θ x}{1+θ }}\right) e{^{-θ x}}\right] }
Cumulative distribution function
F(x\mid θ ,α )=≤ft( 1+α \right) ≤ft[ 1-≤ft( 1+{\frac{θ x}{1+θ }}\right) e{^{-θ x}}\right] -α ≤ft[1-≤ft( 1+{\frac{θ x}{1+θ }}\right) e{^{-θ x}}\right]^{2}
Quantile function
\code{does not have a closed mathematical expression}
Hazard rate function
h(x\mid θ ,α )={\frac{{θ }^{2}≤ft( 1+x\right) e{^{-θ x}≤ft[ 1-α +2α ≤ft( 1+{\frac{θ x}{1+θ }} \right) e{^{-θ x}}\right] }}{≤ft( 1+θ \right) ≤ft\{ ≤ft( 1+α \right) ≤ft[ 1-≤ft( 1+{\frac{θ x}{1+θ }}\right) e{^{-θ x}}\right] -α ≤ft[ 1-≤ft( 1+{\frac{θ x}{1+θ }}\right) e{^{-θ x}}\right] ^{2}\right\} }}
Particular case: α = 0 the one-parameter Lindley distribution.
dtlindley
gives the density, ptlindley
gives the distribution function, qtlindley
gives the quantile function, rtlindley
generates random deviates and htlindley
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]tlindley are calculated directly from the definitions. rtlindley
uses the quantile function.
Merovci, F., (2013). Transmuted Lindley distribution. International Journal of Open Problems in Computer Science and Mathematics, 63, (3), 63-72.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | set.seed(1)
x <- rtlindley(n = 1000, theta = 1.5, alpha = 0.5)
R <- range(x)
S <- seq(from = R[1], to = R[2], by = 0.1)
plot(S, dtlindley(S, theta = 1.5, alpha = 0.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)
ptlindley(q, theta = 1.5, alpha = 0.5, lower.tail = TRUE)
ptlindley(q, theta = 1.5, alpha = 0.5, lower.tail = FALSE)
qtlindley(p, theta = 1.5, alpha = 0.5, lower.tail = TRUE)
qtlindley(p, theta = 1.5, alpha = 0.5, lower.tail = FALSE)
library(fitdistrplus)
fit <- fitdist(x, 'tlindley', start = list(theta = 1.5, alpha = 0.5))
plot(fit)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.