theta
.dmzsm(x, J, theta, log = FALSE)
pmzsm(q, J, theta, lower.tail=TRUE, log.p=FALSE)
qmzsm(p, J, theta, lower.tail = TRUE, log.p = FALSE)
dmzsm
gives the (log) density function, pmzsm
gives the (log)
distribution function, and qmzsm
gives the quantile function.Invalid values for parameters J
or theta
will result in return
values NaN
, with a warning.
$$p(x) = \frac{N(x)}{\sum_1^S N(x)}$$
where S is the number of populations in the sample, and N(x) is the expected number of sampled populations of size x : $$N(x) = \frac{\theta}{x (1 - x/J)^{\theta -1}}$$ Therefore, the mZSM is a model for species abundances distributions (SAD) in a sample taken from a community under the assumptions that (a) species abundances in the community follows the stationary distribution of a neutral, zero-sum stochastic process of birth, death and speciation (or migration); (b) sampling is a Poisson process with expected value well approximated by N(x), (c) individuals are sampled with replacement, or the fraction of total individuals sampled is small enough to approximate a sample with replacement.
Hubbell, S.P. 2001. The Unified Neutral Theory of Biodiversity. Princeton University Press.
fitmzsm
for maximum likelihood estimation;
alonso.eqn12
in package ## Alonso & McKanne (2004) figure 2
data(moths) #Fisher's moths data
m.tab <- hist(moths, breaks = 2^(0:12), plot = FALSE)
plot(m.tab$density~m.tab$mids, log="xy",
xlab = "Abundance", ylab = "Probability density",
ylim=c(1e-7,1))
X <- 1:max(moths)
Y <- dmzsm(X, J = sum(moths), theta = 39.8)
lines(Y ~ X)
Run the code above in your browser using DataLab