Density, distribution function, quantile function and random generation for
the discrete Lindley distribution.
Usage
ddLd2(x, theta, log = FALSE)
pdLd2(q, theta, lower.tail = TRUE, log.p = FALSE)
qdLd2(p, theta, lower.tail = TRUE)
rdLd2(n, theta)
Value
ddLd2 gives the density, pdLd2 gives the distribution
function, qdLd2 gives the quantile function and rdLd2 generates
random deviates.
Arguments
x, q
vector of quantiles.
theta
a parameter.
log, log.p
logical; if TRUE, probabilities p are given as log(p).
lower.tail
logical; if TRUE (default), probabilities are
\(P\left[ X\leq x\right]\), otherwise, \(P\left[ X>x\right] \).
p
vector of probabilities.
n
number of observations. If length(n) > 1, the length is taken
to be the number required.
Details
the discrete Lindley distribution with a parameter \(\theta\),
has density
$$f\left( x\right) =\frac{\lambda ^{x}}{1+\theta }
\left( \theta \left(1-2\lambda \right) +\left( 1-\lambda \right)
\left( 1+\theta x\right)\right),$$
where
$$x=0,1,2,...~,\lambda =\exp \left( -\theta \right) ~and~\theta >0.$$
References
Bakouch, H. S., Jazi, M. A. ve Nadarajah, S., 2014,
A new discrete distribution, Statistics, 48 (1), 200-240.