Learn R Programming

meteR (version 1.2)

residuals.meteDist: Compute residuals between METE predictions and data of a meteDist object

Description

residuals.meteDist computes residuals between METE predictions and data of a meteDist object

Usage

"residuals"(object, type = c("rank", "cumulative"), relative = TRUE, log = FALSE, ...)

Arguments

object
a meteDist object
type
'rank' or 'cumulative'
relative
logical; if true use relative MSE
log
logical; if TRUE calculate MSE on logged distirbution. If FALSE use arithmetic scale.
...
arguments to be passed to methods

Value

a numeic vector giving residuals for each data point

Details

See Examples. Typically not called directly by the user and rather used for calculating the mean square error with mse.meteDist. If type='rank' returned value will be of length equal to number of observations (e.g. number of species in case of SAD) but if type='cumulative' returned value will be of length equal to number of unique ovservations (e.g. number of unique abundances in case of SAR).

References

Harte, J. 2011. Maximum entropy and ecology: a theory of abundance, distribution, and energetics. Oxford University Press.

See Also

mse.meteDist

Examples

Run this code
data(arth)
esf1 <- meteESF(spp=arth$spp,
                abund=arth$count,
                power=arth$mass^(.75),
                minE=min(arth$mass^(.75)))
sad1 <- sad(esf1)
residuals(sad1)

Run the code above in your browser using DataLab