| sad | R Documentation |
Function to create an object of class sad from data or theoretical predictions
sad(x, model, par, keepData = TRUE)
x |
vector of integers representing a sample of species abundances |
model |
character naming model to be fit (can only be length one) |
par |
vector of model parameters |
keepData |
logical, should the data be stored with the fitted |
An object of class sad can be created one three ways:
specifying only x will produce an sad object without any parametric model fit to it
specifying both x and model will fit the model to the data and return an sad object with both empirical and theoretical predictions
specifying both model and par will produce an sad object with only the theoretical prediction but no data
Note that this function behaves almost identically to fitSAD for the case when both x and model are spcified, but sad is more flexible allowing for unfit sad objects and specification of theoretical SADs without fitting of data by maximum likelihood.
A list containing named objects of class sad with elements
MLEThe maximum likelihood estimate(s)
llThe maximized log likelihood
dfThe associated degrees of freedom
nobsThe associated number of observations
modelThe name of the model fit
dataThe data
Andy Rominger <ajrominger@gmail.com>
logLik.sad, dlseries, dplnorm, dstick, dtnegb, dtpois
x <- rtpois(1000, 2) sad(x, model='tpois')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.