Learn R Programming

sads (version 0.2.2)

radpred-methods: Predicted ranked abundance of species

Description

Creates an object of rad-class with the ranked abundances predicted by a species abundance distribution or a rank-abundance distribution.

Arguments

object
an object of class fitrad or fitrad; fitted model of rank-abundance or species abundances distributions. Alternatively a numeric vector abundances of species.
sad, rad
character; root name of sad or rad distribution to calculate expected percentiles. See fitsad and fitrad for available distributions.
coef
named list of numeric values; parameter values of the distribution given in sad or rad. Parameters should be named as in the corresponding density function, and in the same order.
trunc
non-negative integer, trunc > min(x); truncation point if fitted distribution is truncated.
distr
character; type of distribution given in sad: D for discrete or C for continuous.
S
positive integer; number of species in the sample.
N
positive integer; number of individuals in the sample.

References

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.

Examples

Run this code
## Predicted frequencies from a fitted model
## meta-community zero-sum multinomial for BCI data
moths.mzsm <- fitsad(moths, "mzsm")
moths.mzsm.r <- radpred(moths.mzsm)
## Rank-abundance plot with observed and predicted frequencies
plot(rad(moths))
lines(moths.mzsm.r)
## Alternative model: local zero-sum multinomial
## Alonso & Mckane (Ecol. Lett. 2004, table 1) give theta = 41 and m = 0.77
moths.lzsm.r <- 
  radpred( moths, sad = "volkov", distr="D", 
           coef =list(theta = 41, m = 0.77, J=sum(moths)) 
         )
## Adding predicted frequencies to the plot
lines(moths.lzsm.r, col = "red")

Run the code above in your browser using DataLab