Learn R Programming

sads (version 0.2.2)

dvolkov: Neutral Biodiversity Theory distribution by Volkov et al.

Description

Density, distribution function and quantile function for species abundances distribution in a neutral community with immigration as deduced by Volkov et al. (2003).

Usage

dvolkov( x, theta, m, J, order=96, log = FALSE )
pvolkov( q, theta, m , J, lower.tail = TRUE, log.p = FALSE )
qvolkov( p, theta, m, J, lower.tail = TRUE, log.p = FALSE )

Arguments

x
vector of (non-negative integer) quantiles. In the context of species abundance distributions, this is a vector of abundance of species in a sample.
q
vector of (non-negative integer) quantiles. In the context of species abundance distributions, a vector of abundance of species in a sample.
p
vector of probabilities.
theta
positive real, theta > 0; Hubbell's fundamental biodiversity number.
order
order of the approximation for the numerical integration. The default of 96 usually gives a rounding error of 1e-8 for moderate dataset; orders greater than 128 are probably overkill
m
positive real, 0
J
positive integer; sample size. In the context of species abundance distributions, usually the number of individuals in a sample.
log, log.p
logical; if TRUE, probabilities p are given as log(p).
lower.tail
logical; if TRUE (default), probabilities are P[X <= x],="" otherwise,="" p[x=""> x].

Value

  • dvolkov gives the (log) density of the density, pvolkov gives the (log) distribution function, qvolkov gives the (log) the quantile function. Invalid values for parameters J or theta will result in return values NaN, with a warning.

Details

Volkov et al (2003) proposed one of the analytic solutions for the species abundance distributions (SADs) for The Neutral Theory of Biodiversity (Hubbell 2001).

The solution is deduced from a model of stochastic dynamics of a set of species where the following rules apply: (1) replacement of a dead individual by local offspring -- with probability 1-m, individuals picked at random are replaced by the offspring of other individuals picked at random; (2) replacement of a dead individual by an immigrant -- with probability m individuals picked at random are replaced by immigrants taken at random from a pool of potential colonizers (the metacommunity).

Volkov et al. (2003, eq.7) provide the stationary solution for the expected number of species with a given abundance. A probability density function is easily calculated by taking these expected values for abundances 1:J and dividing them by the total number of species. dvolkov is performs the numerical integration of the density function by means of Gaussian quadrature, using a library by Pavel Holoborodko (http://www.holoborodko.com/pavel/?page_id=679). The code is based on the untb::volkov function (Hankin 2007). pvolkov provides CDF by cumulative sum of density values, and qvolkov use a numeric interpolation with a step function (approxfun) to find quantiles. Calculations can be slow for larger datasets.

References

Hankin, R.K.S. 2007. Introducing untb, an RPackage For Simulating Ecological Drift Under the Unified Neutral Theory of Biodiversity. Journal of Statistical Software 22 (12). Hubbell, S. P. 2001. The Unified Neutral Theory of Biodiversity. Princeton University Press. Volkov, I., Banavar, J.R., Hubbell, S.P., Maritan, A. 2003. Neutral theory and relative species abundance in ecology. Nature 424:1035--1037

See Also

fitvolkov for maximum likelihood fit, dmzsm for the distribution of abundances in the metacommunity, volkov in package untb.

Examples

Run this code
## Volkov et al 2003 fig 1
## But without Preston correction to binning method
## and only the line of expected by Volkov's model
data( bci )
bci.oct <- octav( bci, preston = FALSE )
plot( bci.oct )
CDF <- pvolkov( bci.oct$upper, theta = 47.226, m = 0.1, J = sum(bci) )
bci.exp <- diff( c(0,CDF) ) * length(bci)
midpoints <- as.numeric( as.character( bci.oct$octave ) ) - 0.5
lines( midpoints, bci.exp, type="b" )

## the same with octavpred
bci.exp2 <- octavpred( bci, sad = "volkov",
                      coef = list(theta = 47.226, m = 0.1, J=sum(bci)) )
lines( bci.exp2 )

Run the code above in your browser using DataLab