alpha
.dls( x, N , alpha, log=FALSE)
pls(q, N, alpha, lower.tail=TRUE, log.p=FALSE)
qls(p, N, alpha, lower.tail = TRUE, log.p = FALSE)
dls
gives the (log) of the density, pls
gives the (log)
distribution function, qls
gives the (log) the quantile function.Invalid values for parameter alpha
will result in return
values NaN
, with a warning.
Where X is a function of alpha and N, that tends to one as the sample size N increases:
Green,J. and Plotkin, J.B. 2007 A statistical theory for sampling species abundances. Ecology Letters 10:1037--1045
Pielou, E.C. 1977. Mathematical Ecology. New York: John Wiley and Sons.
dpois
, dnbinom
, dpoig
.
For maximum likelihood estimation in the context of species
abundance distributions see fitls
, fisherfit
in fisher
in x <- 1:100
PDF <- dls(x=x, N=100, alpha=5)
CDF <- pls(q=x, N=100, alpha=5)
par(mfrow=c(1,2))
plot(x,CDF, ylab="Cumulative Probability", type="b",
main="Log-Series distribution, CDF")
plot(x,PDF, ylab="Probability", type="h",
main="Log-Series distribution, PDF")
par(mfrow=c(1,1))
## Fisher log-series is a discrete PDF, hence:
all.equal(pls(10,N=1000,alpha=50), sum(dls(1:10,N=1000,alpha=50))) # should be TRUE
## qls is the inverse of pls
all.equal(qls(CDF,N=100,alpha=5), x) # should be TRUE
Run the code above in your browser using DataLab