lmoments3 API¶
Sample L-moments¶
- lmoments3.lmom_ratios(data, nmom=5)[source]¶
Estimate nmom number of L-moments from a sample data.
- Parameters:
data (list or array-like sequence) – Sequence of (sample) data
nmom (int) – number of L-moments to estimate
- Returns:
L-moment ratios like this: l1, l2, t3, t4, t5, .. . As in: items 3 and higher are L-moment ratios. # noqa: E501
- Return type:
list
Distributions¶
L-moments for scipy.stats distributions.
- class lmoments3.distr.LmomDistrMixin[source]¶
Mixin class to add L-moment methods to
scipy.stats.rv_continousdistribution functions.Distributions using the mixin should override the methods
_lmom_fit()andlmom_ratios().- lmom_fit(data=None, lmom_ratios=None)[source]¶
Fit the distribution function to the given data or given L-moments.
- Parameters:
data (array_like) – Data to use in calculating the distribution parameters
lmom_ratios (array_like) – L-moments (ratios) l1, l2, t3, t4, .. to use in calculating the distribution parameters
- Returns:
Distribution parameters in scipy order, e.g. scale, loc, shape
- Return type:
OrderedDict
- lmom(*args, nmom=5, **kwds)[source]¶
Compute the distribution’s L-moments, e.g. l1, l2, l3, l4, ..
- Parameters:
args (float) – Distribution parameters in order of shape(s), loc, scale
nmom (int) – Number of moments to calculate
kwds (float) – Distribution parameters as named arguments. See
rv_continous.shapesfor names of shape parameters
- Returns:
List of L-moments
- Return type:
list
- lmom_ratios(*args, nmom=5, **kwds)[source]¶
Compute the distribution’s L-moment ratios, e.g. l1, l2, t3, t4, ..
- Parameters:
args (float) – Distribution parameters in order of shape(s), loc, scale
nmom (int) – Number of moments to calculate
kwds (float) – Distribution parameters as named arguments. See
rv_continous.shapesfor names of shape parameters
- Returns:
List of L-moment ratios
- Return type:
list
Other statistical functions¶
Statistics functions for L-moments analysis.
- lmoments3.stats.AIC(data, distr_name, distr_paras)[source]¶
Calculate the Akaike Information Criterion (AIC).