mu
and sigma
.dpoilog( x, mu, sig, log=FALSE)
ppoilog( q, mu, sig, lower.tail=TRUE, log.p=FALSE)
qpoilog( p, mu, sig, lower.tail = TRUE, log.p = FALSE)
dpoilog
function from dpoilog
is just a wrapper of poilog::dpoilog
with an additional log
argument. ppoilog
does the cumulative sum of poilog::dpoilog
.
qpoilog
uses modified bisection method to find numerically quantiles using
ppoilog
, and is extremely slow for a large number of quantiles.
$$p(x) = \frac{e^{x \mu + x^2 \sigma/2} (2 \pi \sigma)^{-1/2}}{x!} \, g(y)$$
where $$g(y) = \int_{-\infty}^\infty \, e^{-e^y} \frac{e^{(-y-\mu-x \sigma)^2}}{2 \sigma} \, dy$$
(Bulmer 1974 eq.5). For x = 0, 1, 2, ... .
In ecology, this distribution gives the probability that a species has an abundance of x individuals in a random sample of a fraction 'f' of the community. In the community, the species abundances are independent random variables that follow a lognormal density function, with parameters (mu + ln(f), sigma) (Engen et al. 2002).
Hence, a Poisson-lognormal distribution is a model for species abundances distributions (SAD) in a sample taken from a community under the assumptions: (a) species abundances in the community are independent identically distributed lognormal variables, (b) sampling is a Poisson process with expected value E[x]= f*n where n is the abundance in the community and f the fraction of individuals sampled, (c) individuals are sampled with replacement, or the fraction of total individuals sampled is small enough to approximate a sample with replacement. See Engen (1977) and Alonso et al. (2008) for critical evaluations.
Bulmer,M. G. 1974. On Fitting the Poisson Lognormal Distribution to Species-Abundance Data. Biometrics, 30: 101-110.
Engen, S. 1977. Comments on two different approaches to the analysis of species frequency data. Biometrics, 33: 205-213. Engen, S., R. Lande, T. Walla & P. J. DeVries. 2002. Analyzing spatial structure of communities using the two-dimensional Poisson lognormal species abundance model. American Naturalist 160: 60-73.
rsad
for random
generation, fitpoilog
for maximum likelihood estimation.