Models (macroeco.models)

This module contains distributions and curves (i.e., standard mathematical functions) commonly used in analysis of ecological patterns.

Distributions

All of the distributions here are subclasses of either rv_continuous and rv_discrete found in scipy.stats. Several of the distributions here are similar to or based on existing distributions found in scipy.stats but are updated to allow the use of common ecological parameterizations.

In addition to all of the methods found in scipy.stats, methods for fitting distributions and curves to data and for translating common distribution arguments into formal parameters (i.e., deriving the p of the geometric distribution from the distribution mean) are also provided in these classes.

The following discrete distributions are available.

geom A geometric discrete random variable.
geom_uptrunc An upper-truncated geometric discrete random variable.
nbinom A negative binomial discrete random variable.
nbinom_ztrunc The zero-truncated negative binomial random variable.
cnbinom The conditional negative binomial random variable.
logser Logseries (logarithmic) random variable.
logser_uptrunc Upper truncated logseries random variable.
plnorm Poisson lognormal random variable.
plnorm_ztrunc Zero-truncated poisson lognormal random variable.
dgamma A discrete gamma random variable.

The following continuous distributions are available.

expon An exponential continuous random variable.
expon_uptrunc An upper-truncated exponential continuous random variable.
lognorm A lognormal random variable.

Curves

Several common curves used in ecologial analysis are included here.

power_law A power-law function
mete_sar A SAR/EAR predicted by the Maximum Entropy Theory of Ecology
mete_sar_iterative A SAR/EAR predicted by the Maximum Entropy Theory of Ecology
mete_ear A SAR/EAR predicted by the Maximum Entropy Theory of Ecology
sampling_sar A general sampling SAR/EAR
sampling_sar_iterative A general sampling SAR/EAR
sampling_ear A general sampling SAR/EAR