dbs  R Documentation 
Density, distribution function, quantile function and random generation for
the Brokenstick distribution with parameters N
and S
.
dbs( x, N, S, log = FALSE )
pbs( q, N, S, lower.tail = TRUE, log.p = FALSE )
qbs( p, N, S, lower.tail = TRUE, log.p = FALSE )
rbs( n, N, S )
drbs( x, N, S, log = FALSE )
prbs( q, N, S, lower.tail = TRUE, log.p = FALSE )
qrbs( p, N, S, lower.tail = TRUE, log.p = FALSE )
rrbs( n, N, S)
x 
vector of (nonnegative integer) quantiles. In the context of
species abundance distributions, this is a vector of abundances (for

q 
vector of (nonnegative integer) quantiles. In the context of
species abundance distributions, a vector of abundances
(for 
n 
number of random values to return. 
p 
vector of probabilities. 
N 
positive integer 0 < N < Inf, sample size. In the context of species abundance distributions, the sum of abundances of individuals in a sample. 
S 
positive integer 0 < S < Inf, number of elements in a collection. In the context of species abundance distributions, the number of species 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]. 
The Brokenstick distribution was proposed as a model for the expected abundance of elements in a collection:
n(i) = \frac{N}{S} \sum_{k=i}^S 1/k
where n(i) is the abundance in the ith most abundant element (MacArthur 1960, May 1975). Hence the probability (or expected proportion of occurrences) in the ith element is
p(i) = \frac{n(i)}{S} = S^{1}\sum_{k=i}^S 1/k
[dpq]rbs
stands for "rankabundance Brokenstick" and return
probabilities and quantiles based on the expression above, for p(i).
Therefore, [dpq]rbs
can be used as a rankabundance model
for species' ranks in a sample or in a biological community
see fitrad
.
The probability density for a given abundance value in the Brokenstick model is given by
p(x) = \frac{S1}{N} \left( 1  \frac{x}{N} \right)^{S2}
Where x is the abundance of a given element in the collection (May 1975).
[dpq]bs
return probabilities and quantiles according to the
expression above for p(x).
Therefore, [dpq]bs
can be used as a
species abundance model
see fitsad
.
dbs
gives the (log) density and pbs
gives the (log)
distribution function of abundances, and qbs
gives the
corresponding quantile function.
drbs
gives the (log) density and prbs
gives the (log)
distribution function of ranks, and qrbs
gives the
corresponding quantile function.
Paulo I Prado prado@ib.usp.br and Murilo Dantas Miranda.
MacArthur, R.H. 1960. On the relative abundance of species. Am Nat 94:25–36.
May, R.M. 1975. Patterns of Species Abundance and Diversity. In Cody, M.L. and Diamond, J.M. (Eds) Ecology and Evolution of Communities. Harvard University Press. pp 81–120.
fitbs
and fitrbs
to fit the Brokenstick distribution
as a abundance (SAD) and rankabundance (RAD) model.
x < 1:25
PDF < drbs(x=x, N=100, S=25)
CDF < prbs(q=x, N=100, S=25)
par(mfrow=c(1,2))
plot(x,CDF, ylab="Cumulative Probability", type="b",
main="Brokenstick rank distribution, CDF")
plot(x,PDF, ylab="Probability", type="h",
main="Brokenstick rank distribution, PDF")
par(mfrow=c(1,1))
## quantile is the inverse of CDF
all.equal( qrbs( CDF, N=100, S=25), x) # should be TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.