dman: Zipf-Mandelbrodt distribution

dmandR Documentation

Zipf-Mandelbrodt distribution


Density, distribution function, quantile function and random generation for Zipf-Mandelbrodt distribution with parameters N s and v.


dmand( x, N, s, v, log=FALSE)
pmand( q, N, s, v, lower.tail=TRUE, log.p=FALSE)
qmand( p, N, s, v, lower.tail = TRUE, log.p = FALSE)
rmand( n, N, s, v)



vector of (non-negative integer) quantiles. In the context of species abundance distributions, this is a vector of abundance ranks of species in a sample.


vector of (non-negative integer) quantiles. In the context of species abundance distributions, a vector of abundance ranks of species in a sample.


number of random values to return.


vector of probabilities.


positive integer 0 < N < Inf, total number of elements of a collection. In the context of species abundance distributions, usually the number of species in a sample.


positive real s > 0; Zipf-Mandelbrodt exponent.


positive real or zero v >= 0; Zipf-Mandelbrodt parameter.

log, log.p

logical; if TRUE, probabilities p are given as log(p).


logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x].


The Mandelbrodt distribution describes the probability or frequency of occurrence of a given element from a set of N elements. This probability is inversely proportional to a power s of the rank of the frequency of the element in the set. The density function is

p(x) = \frac{(x+v)^{-s}}{\sum_{i=1}^N (i+v)^{-s}}

Since p(x) is proportional to a power of x, the Zipf-Mandelbrodt distribution is a power distribution. The Zipf distribution is a special case when v=0. Hence, the Zipf-Mandelbrodt distribution is a generalization of the Zipf Law, and is widely used in the [x] for the same purposes. In Ecology, it can be used to describe the probability of the abundance rank x of given species in a sample or assemblage of N species.


dmand gives the (log) density of the density, pmand gives the (log) distribution function, qmand gives the quantile function.

Invalid values for parameters v or s will result in return values NaN, with a warning.


Paulo I Prado and Murilo Dantas Miranda.


Johnson N.L., Kemp, A.W. and Kotz S. 2005. Univariate Discrete Distributions, 3rd edition, Hoboken, New Jersey: Wiley. Section 11.2.20.

Magurran, A.E. and McGill, B.J. 2011. Biological Diversity - Frontiers in measurement and assessment. Oxford: Oxford University Press.

See Also

dmand and rmand and related functions in mandR package; Zeta for zeta distribution in VGAM package.


x <- 1:100
PDF <- dmand(x=x, N=100, s=1.5, v=2)
CDF <- pmand(q=x, N=100, s=1.5, v=2)
plot(x,CDF, ylab="Cumulative Probability", type="b",
     main="Zipf-Mandelbrodt distribution, CDF")
plot(x,PDF, ylab="Probability", type="h",
     main="Zipf-Mandelbrodt distribution, PDF")

## quantile is the inverse of CDF
all.equal( qmand(p=CDF, N=100, s=1.5, v=2), x)

## Zipf distribution is a particular case of ZM when v=0
all.equal( dmand(x=x, N=100, s=1.5, v=0), dzipf(x=x, N=100, s=1.5) )

sads documentation built on June 22, 2024, 12:18 p.m.