fitrad {sads}  R Documentation 
Fits probability distributions for abundance ranks of species in a sample or assemblage by maximum likelihood.
fitrad(x, rad =c("gs", "mand", "rbs", "zipf"), ...) fitgs(x, trunc, start.value, ...) fitmand(x, trunc, start.value, ...) fitrbs(x, trunc, ...) fitzipf(x, N, trunc, start.value, upper = 20, ...)
x 
vector of (positive integer) quantiles or an object of

rad 
character; root name of community rad distribution to be fitted.
"gs" for geometric series (not geometric distribution,

trunc 
nonnegative integer, 
N 
positive integer, total number of individuals in the sample/assemblage. 
start.value 
numeric named vector; starting values of free parameters to be
passed to 
upper 
real positive; upper bound for the Brent's oneparameter optimization
method (default), for fits that use this method by default. See
details and 
... 
in fitrad further arguments to be passed to the specific fitting
function (most used are 
All these functions fit rankabundance distributions (RAD) to a vector of
abundances or a rankabundance table of the radclass
.
RADs assign probabilities p(i) to each rank i, which can be interpreted as
the expected proportion of total individuals in the sample that are of
the ith species.
fitrad
is simply a wrapper that calls the specific functions to fit
the distribution chosen with the argument rad
. Users
can interchangeably use fitrad
or the individual functions
detailed below
(e.g. fitrad(x, sad="rbs", ...)
is the same as
fitrbs(x, ...)
and so on).
The distributions are fitted by the
maximum likelihood method using numerical optimization,
with mle2
.
The resulting object is of fitradclass
which can be handled with mle2
methods
for fitted models and has also some additional
methods for RADs models (see
fitradclass
and examples).
By default, fitting to oneparameter distributions (fitgs
,
fitzipf
) uses Brent's onedimensional method of optimization (see
optim
).
fitgs
fits Motomura's Geometric Series (Whittaker
1965, May 1975) to abundance ranks.
This was the first model fitted to species
abundance data (Motomura 1932, apud Doi and Mori 2012),
which was subsequently described as the result
of niche preemption at a constant rate (Numata et. al. 1953 apud Doi
and Mori 2012). The initial guess for parameter k is given by
the expression 1  (nmin/nmax)^(1/(S1)) (He & Tang, 2008).
fitrbs
fits the Brokenstick distribution
(MacArthur 1960) to abundance ranks. It is defined only by the observed number of
elements S
in the collection and collection size N
.
Therefore, once a sample is taken,
the Brokenstick has no free parameters.
Therefore, there is no actual fitting, but still
the fitrbs
calls
mle2
with
fixed parameters N and S and eval.only=TRUE
to return an object of fitradclass
to keep compatibility with other
RAD models fitted to the same data.
Therefore the resulting objects allows most of the
operations with RAD models, such as
comparison with other models through model selection,
diagnostic plots and so on
(see fitradclass).
fitzipf
and fitmand
fit the Zipf distribution and its
twoparameter generalization, the ZipfMandelbrodt distribution. Both
are discrete powerlaw distributions commonly proposed as RAD models,
though they in general provide poor fit to species abundances (Newman 2005).
An object of fitradclass
which inherits from mle2class
and thus has methods for handling
results of maximum likelihood fits from mle2
and also specific methods to handle rankabundance models.
Paulo I Prado prado@ib.usp.br, Andre Chalom and Murilo Dantas Miranda
all fitting functions builds on mle2
and methods
from 'bbmle' package (Bolker 2012), which in turn builds on
mle
function and associated classes and methods.
Bolker, B. and R Development Core Team 2012. bbmle: Tools for general maximum likelihood estimation. R package version 1.0.5.2. http://CRAN.Rproject.org/package=bbmle
Doi, H. and Mori, T. 2012. The discovery of speciesabundance distribution in an ecological community. Oikos 122: 179–182.
He, F. and Tang, D. 2008. Estimating the niche preemption parameter of the geometric series. Acta Oecologica 33: 105–107.
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.
Newman, M.E.J. 2005. Power laws, Pareto distributions and Zipf's law. Contemporary Physics, 46: 323–351.
Whittaker, R.H. 1965. Dominance and diversity in land plant communities. Science 147: 250–260.
dgs
, dmand
, drbs
,
dzipf
,
for corresponding density functions created for fitting RADs;
fitradclass
.
## Figure 2 of Motomura (1932) data(okland) plot(rad(okland)) ok.gs < fitrad(okland, "gs") lines(radpred(ok.gs)) ## Comparison with ZipfMandelbrodt ok.zm < fitrad(okland, "mand") AICctab(ok.gs, ok.zm, nobs=length(okland)) lines(radpred(ok.zm), col="red")