| PoissonLindleyLognormal | R Documentation |
These functions provide density, distribution, quantile, and random generation for the Poisson-Lindley-Lognormal (PLL) Distribution.
dplindLnorm(
x,
mean = 1,
theta = 1,
sigma = 1,
ndraws = 1500,
log = FALSE,
hdraws = NULL
)
pplindLnorm(
q,
mean = 1,
theta = 1,
lambda = NULL,
sigma = 1,
ndraws = 1500,
lower.tail = TRUE,
log.p = FALSE
)
qplindLnorm(p, mean = 1, theta = 1, sigma = 1, ndraws = 1500, lambda = NULL)
rplindLnorm(n, mean = 1, theta = 1, sigma = 1, ndraws = 1500, lambda = NULL)
x |
numeric value or vector of values. |
mean |
mean (>0). |
theta |
Poisson-Lindley theta parameter (>0). |
sigma |
lognormal sigma parameter (>0). |
ndraws |
number of Halton draws. |
log |
return log-density. |
hdraws |
optional Halton draws. |
q |
quantile or vector of quantiles. |
lambda |
optional lambda parameter (>0). |
lower.tail |
TRUE returns P[X
x]. |
log.p |
return log-CDF. |
p |
probability or vector of probabilities. |
n |
number of random draws. |
The PLL is a 3-parameter count distribution that captures high mass at small y and allows flexible heavy tails.
dplind computes the PLL density.
pplind computes the PLL CDF.
qplind computes quantiles.
rplind generates random draws.
The PMF is:
f(y|\mu,\theta,\sigma)=\int_0^\infty
\frac{\theta^2\mu^y x^y(\theta+\mu x+y+1)}
{(\theta+1)(\theta+\mu x)^{y+2}}
\frac{\exp\left(-\frac{\ln^2(x)}{2\sigma^2}\right)}
{x\sigma\sqrt{2\pi}}dx
Mean:
E[y]=\mu=\frac{\lambda(\theta+2)e^{\sigma^2/2}}
{\theta(\theta+1)}
Halton draws are used to evaluate the integral.
dplindLnorm gives the density, pplindLnorm gives the distribution function, qplindLnorm gives the quantile function, and rplindLnorm generates random deviates.
The length of the result is determined by n for rplindLnorm, and is the maximum of the lengths of the numerical arguments for the other functions.
dplindLnorm(0, mean=0.75, theta=7, sigma=2, ndraws=10)
pplindLnorm(0:10, mean=0.75, theta=7, sigma=2, ndraws=10)
qplindLnorm(c(0.1,0.5,0.9), lambda=4.67, theta=7, sigma=2)
rplindLnorm(5, mean=0.75, theta=7, sigma=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.