Learn R Programming

vegan (version 1.6-0)

fisherfit: Fit Fisher's Logseries and Preston's Lognormal model to Abundance Data

Description

Function fisherfit fits Fisher's logseries to abundance data. Function prestonfit groups species frequencies into doubling octave classes and fits Preston's lognormal model, and function prestondistr fits the truncated lognormal model without pooling the data into octaves.

Usage

fisherfit(x, ...)
prestonfit(x, ...)
prestondistr(x, ...)
## S3 method for class 'prestonfit':
plot(x, xlab = "Frequency", ylab = "Species", bar.col = "skyblue", 
    line.col = "red", lwd = 2, ...)
## S3 method for class 'prestonfit':
lines(x, line.col = "red", lwd = 2, ...)
veiledspec(x, ...)
as.fisher(x, ...)

Arguments

x
Community data vector for fitting functions or their result object for plot functions.
xlab, ylab
Labels for x and y axes.
bar.col
Colour of data bars.
line.col
Colour of fitted line.
lwd
Width of fitted line.
...
Other parameters passed to functions.

Value

  • The function prestonfit returns an object with fitted coefficients, and with observed (freq) and fitted (fitted) frequencies, and a string describing the fitting method. Function prestondistr omits the entry fitted. The function fisherfit returns the result of nlm, where item estimate is $\alpha$. The result object is amended with the following items:
  • df.residualsResidual degrees of freedom.
  • nuisanceParameter $x$.
  • fisherObserved data from as.fisher.

Details

In Fisher's logarithmic series the expected number of species $f$ with $n$ observed individuals is $f_n = \alpha x^n / n$ (Fisher et al. 1943). The estimation follows Kempton & Taylor (1974) and uses function nlm. The estimation is possible only for genuine counts of individuals. The parameter $\alpha$ is used as a diversity index, and $\alpha$ and its standard error can be estimated with a separate function fisher.alpha. The parameter $x$ is taken as a nuisance parameter which is not estimated separately but taken to be $N/(N+\alpha)$. Helper function as.fisher transforms abundance data into Fisher frequency table.

Preston (1948) was not satisfied with Fisher's model which seemed to imply infinite species richness, and postulated that rare species is a diminishing class and most species are in the middle of frequency scale. This was achieved by collapsing higher frequency classes into wider and wider ``octaves'' of doubling class limits: 1, 2, 3--4, 5--8, 9--16 etc. occurrences. Any logseries data will look like lognormal when plotted this way. The expected frequency $f$ at abundance octave $o$ is defined by $f_o = S_0 \exp(-(\log_2(o) - \mu)^2/2/\sigma^2)$, where $\mu$ is the location of the mode and $\sigma$ the width, both in $\log_2$ scale, and $S_0$ is the expected number of species at mode. The lognormal model is usually truncated on the left so that some rare species are not observed. Function prestonfit fits the truncated lognormal model as a second degree log-polynomial to the octave pooled data using Poisson error. Function prestondistr fits left-truncated Normal distribution to $log_2$ transformed non-pooled observations with direct maximization of log-likelihood. Function prestondistr is modelled after function fitdistr which can be used for alternative distribution models. The functions have common print, plot and lines methods. The lines function adds the fitted curve to the octave range with line segments showing the location of the mode and the width (sd) of the response.

The total extrapolated richness from a fitted Preston model can be found with function veiledspec. The function accepts results both from prestonfit and from prestondistr. If veiledspec is called with a species count vector, it will internally use prestonfit. Function specpool provides alternative ways of estimating the number of unseen species. In fact, Preston's lognormal model seems to be truncated at both ends, and this may be the main reason why its result differ from lognormal models fitted in Rank--Abundance diagrams with functions rad.lognormal or rad.veil.

References

Fisher, R.A., Corbet, A.S. & Williams, C.B. (1943). The relation between the number of species and the number of individuals in a random sample of animal population. Journal of Animal Ecology 12: 42-58.

Kempton, R.A. & Taylor, L.R. (1974). Log-series and log-normal parameters as diversity discriminators for Lepidoptera. Journal of Animal Ecology 43: 381-399.

Preston, F.W. (1948) The commonness and rarity of species. Ecology 29, 254--283.

See Also

diversity, fisher.alpha, radfit, specpool. Function fitdistr of MASS package was used as the model for fitdistr. Function density can be used for smoothed ``non-parametric'' estimation of responses, and qqplot is an alternative, traditional and more effective way of studying concordance of observed abundances to any distribution model.

Examples

Run this code
data(BCI)
plot(fisherfit(BCI[5,]))
# prestonfit seems to need large samples
mod.oct <- prestonfit(colSums(BCI))
mod.ll <- prestondistr(colSums(BCI))
mod.oct
mod.ll
plot(mod.oct)  
lines(mod.ll, line.col="blue3") # Different
## Smoothed density
den <- density(log2(colSums(BCI)))
lines(den$x, ncol(BCI)*den$y, lwd=2) # Fairly similar to mod.oct
## Extrapolated richness
veiledspec(mod.oct)
veiledspec(mod.ll)

Run the code above in your browser using DataLab