Learn R Programming

sads (version 0.2.2)

fitsad-class: Class "fitsad" for maximum likelihood fitting of species abundance distributions

Description

This class extends mle2-class to encapsulate models of species abundance distributions (SADs) fitted by maximum likelihood.

Arguments

Objects from the Class

Objects created by a call to function fitsad, which fits a probability distribution to an abundance vector.

Extends

Class "mle2", directly.

source

this class builds on mle2-class of bbmle package (Bolker 2012), which in turn builds on mle-class.

References

Bolker, B. and R Development Core Team 2012. bbmle: Tools for general maximum likelihood estimation. R package version 1.0.5.2. http://CRAN.R-project.org/package=bbmle

See Also

mle2-class for all methods available from which fitsad-class inherits; fitsad for details on fitting SADs models; octavpred and radpred to get rank-abundance and frequencies of species in octaves predicted from fitted models.

Examples

Run this code
moths.ls <- fitsad(moths, "ls")
## The class has a plot method to show diagnostic plots
par(mfrow=c(2,2))
plot(moths.ls)
par(mfrow=c(1,1))
## Some useful methods inherited from mle2-class
coef(moths.ls)
confint(moths.ls)
logLik(moths.ls)
## Model selection
moths.ln <- fitsad(moths, "lnorm", trunc=0.5)
AICctab(moths.ls, moths.ln, nobs=length(moths), base=TRUE)

Run the code above in your browser using DataLab