fitrad-class {sads}R Documentation

Class "fitrad" for maximum likelihood fitting of species rank-abundance distributions

Description

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

Objects from the Class

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

Slots

rad:

Object of class "character"; root name of the species abundance distribution fitted. See man page of fitrad for available models.

distr:

Deprecated since sads 0.2.4. See distr function

trunc:

Object of class "numeric"; truncation value used in the fitted model. 'NA' for a non-truncated distribution.

rad.tab:

Object of class "rad"; rank-abundance table of observed abundances.

call:

Object of class "language"; The call to mle2.

call.orig:

Object of class "language" The call to mle2, saved in its original form (i.e. without data arguments evaluated).

coef:

Object of class "numeric"; Vector of estimated parameters.

fullcoef:

Object of class "numeric"; Fixed and estimated parameters.

vcov:

Object of class "matrix"; Approximate variance-covariance matrix, based on the second derivative matrix at the MLE.

min:

Object of class "numeric"; Minimum value of objective function = minimum negative log-likelihood.

details:

Object of class "list"; Return value from optim.

minuslogl:

Object of class "function"; The negative log-likelihood function.

method:

Object of class "character"; The optimization method used.

data:

Object of class "data.frame"; Data with which to evaluate the negative log-likelihood function.

formula:

Object of class "character"; If a formula was specified, a character vector giving the formula and parameter specifications.

optimizer:

Object of class "character"; The optimizing function used.

Extends

Class "mle2", directly.

Methods

octavpred

signature(object = "fitrad", sad = "missing", rad = "missing", coef = "missing", trunc = "missing", oct = "ANY", S = "missing", N = "missing"): expected number of species per abundance octave, see octav and octavpred.

plot

signature(x = "fitrad", y = "ANY"): diagnostic plots of the fitted model.

show

signature(object = "fitrad"): Displays object.

pprad

signature(x = "fitrad", sad = "missing", coef = "missing", trunc = "missing"): plot of observed vs predicted percentiles of the abundance distribution, details in pprad.

qqrad

signature(x = "fitrad", sad = "missing", coef = "missing", trunc = "missing"): plot of observed vs predicted quantiles of the abundance distribution, details in qqrad.

radpred

signature(object = "fitrad", sad = "missing", rad = "missing", coef = "missing", trunc = "missing", distr = "missing", S = "missing", N = "missing"): expected abundances of the 1st to n-th most abundant species, see rad and radpred.

Note

Class fitrad only adds four slots to class mle2. The descriptions of slots inherited from mle2-class replicate those in mle2-class.

Author(s)

Paulo I Prado prado@ib.usp.br and Murilo Dantas Miranda, after Ben Bolker and R Core Team.

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 fitrad-class inherits; fitrad for details on fitting RADs models; octavpred and radpred to get rank-abundance and frequencies of species in octaves predicted from fitted models.

Examples

ok.gser <- fitrad(okland, "gs")
## The class has a plot method to show diagnostic plots
par(mfrow=c(2,2))
plot(ok.gser)
# The same plot, but with relative abundances
plot(ok.gser, prop = TRUE)
par(mfrow=c(1,1))
## Some useful methods inherited from mle2-class
coef(ok.gser)
confint(ok.gser)
logLik(ok.gser)
## Model selection
ok.zipf <- fitrad(okland, "zipf")
AICctab(ok.gser, ok.zipf, nobs=length(moths), base=TRUE)

[Package sads version 0.4.2 Index]