warsa.hydrostatistics package

Submodules

warsa.hydrostatistics.genloglogistic module

cdf(x, c, loc=0, scale=1)

Return the cdf :param x: :type x: :param c: :type c: :param loc: :type loc: :param scale: :type scale: :return: :rtype:

warsa.hydrostatistics.moments module

lmoments(sample, n=4, ratio=True, lcv=False, sorted_sample=False)

Return the n first L-moments of the sample. If ratio is True, return Lr/L2 for r >= 3, where L3/L2 is the L-skewness and L4/L2 is the L-kurtosis If lcv is True, return the L-coefficient of variation L2/L1. For a non-negative random variable, this lies in the interval (0,1) and is identical to the Gini coefficient (see https://en.wikipedia.org/wiki/L-moment) :param sample: :param n: :param ratio: :param lcv: :param sorted_sample: :return:

lmoments_parameter_estimation_gamma(lambda1, lambda2)

Return the location and scale of the gamma distribution.

Based on SUBROUTINE PELGAM of the LMOMENTS Fortran package version 3.04, July 2005

Parameters:
  • lambda1 – L-moment-1
  • lambda2 – L-moment-2
Returns:

lmoments_parameter_estimation_generalized_logistic(lambda1, lambda2, tau)

Return the location, scale and shape or the generalized logistic distribution

Parameters:
  • lambda1 – L-moment-1
  • lambda2 – L-moment-2
  • tau – L-moment-3 / L-moment-2
Returns:

pwm(sample, n=4, sorted_sample=False)

See for example: Diana Bilkova (2014): L-Moments and TL-Moments as an Alternative Tool of Statistical Data Analysis. Journal of Applied Mathematics and Physics, Vol.02 No.10(2014), Article ID:49981, 10 pages 10.4236/jamp.2014.210104 (http://file.scirp.org/Html/1-1720182_49981.htm)

Parameters:
  • sample – list or numpy array of values
  • n – number of returned pwms
  • sorted_sample – default False
Returns:

Module contents