PoissonLindley | R Documentation |
Density (mass), distribution function, quantile function, and random generation for the Poisson-Lindley distribution.
dpoislind(x, theta, log = FALSE)
ppoislind(q, theta, lower.tail = TRUE, log.p = FALSE)
qpoislind(p, theta, lower.tail = TRUE, log.p = FALSE)
rpoislind(n, theta)
x , q |
Vector of quantiles. |
p |
Vector of probabilities. |
n |
The number of observations. If |
theta |
The shape parameter, which must be greater than 0. |
log , log.p |
Logical vectors. If |
lower.tail |
Logical vector. If |
The Poisson-Lindley distribution has mass
p(x) = \frac{\theta^{2}(x + \theta + 2)}{(\theta + 1)^{x+3}},
where x=0,1,\ldots
and \theta>0
is the shape parameter.
dpoislind
gives the density (mass), ppoislind
gives the distribution function, qpoislind
gives the quantile function, and rpoislind
generates random deviates for the specified distribution.
Ghitany, M. E. and Al-Mutairi, D. K. (2009), Estimation Methods for the Discrete Poisson-Lindley Distribution, Journal of Statistical Computation and Simulation, 79, 1–9.
Sankaran, M. (1970), The Discrete Poisson-Lindley Distribution, Biometrics, 26, 145–149.
runif
and .Random.seed
about random number generation.
## Randomly generated data from the Poisson-Lindley
## distribution.
set.seed(100)
x <- rpoislind(n = 150, theta = 0.5)
hist(x, main = "Randomly Generated Data", prob = TRUE)
x.1 <- sort(x)
y <- dpoislind(x = x.1, theta = 0.5)
lines(x.1, y, col = 2, lwd = 2)
plot(x.1, ppoislind(q = x.1, theta = 0.5), type = "l",
xlab = "x", ylab = "Cumulative Probabilities")
qpoislind(p = 0.20, theta = 0.5, lower.tail = FALSE)
qpoislind(p = 0.80, theta = 0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.