fitsad-class | R Documentation |
"fitsad"
for maximum likelihood fitting of
species abundance distributionsThis class extends mle2-class
to encapsulate models of species
abundance distributions (SADs) fitted by maximum likelihood.
Objects created by a call to function fitsad
, which fits a
probability distribution to an abundance vector.
sad
:Object of class "character"
; root name of
the species abundance distribution fitted. See man page of
fitsad
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.
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.
Class "mle2"
, directly.
signature(object = "fitsad", 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
.
signature(x = "fitsad", y = "ANY")
: diagnostic
plots of the fitted model.
signature(object = "fitsad")
: Displays number of
observations (number of species) in the data to which the model was fitted.
signature(object = "fitsad")
: Displays object.
signature(x = "fitsad", sad = "missing", coef =
"missing", trunc = "missing")
: plot of observed vs predicted
percentiles of the abundance distribution, details in
ppsad
.
signature(x = "fitsad", sad = "missing", coef =
"missing", trunc = "missing", distr = "missing")
: plot of observed vs predicted
quantiles of the abundance distribution, details in
qqsad.
signature(object = "fitsad", 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
.
Class fitsad
only adds three slots to class
mle2
. The descriptions of slots inherited from mle2-class
replicate those in mle2-class
.
Paulo I Prado prado@ib.usp.br and Murilo Dantas Miranda, after Ben Bolker and R Core Team.
this class builds on mle2-class
of bbmle package (Bolker
2012), which in turn builds on mle-class
.
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
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.
moths.ls <- fitsad(moths, "ls")
## The class has a plot method to show diagnostic plots
par(mfrow=c(2,2))
plot(moths.ls)
# the same plot, but with relative abundances
plot(moths.ls, prop = TRUE)
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.