[SciPy-User] Which stats package am I missing for a function to do L-moments to Pearson 3 parameters calculation?
josef.pktd@gmai...
josef.pktd@gmai...
Wed Nov 28 16:48:49 CST 2012
On Wed, Nov 28, 2012 at 5:28 PM, James Adams <monocongo@gmail.com> wrote:
> I'm writing a Python program which needs to compute Pearson Type III
> parameters from L-moments, and then calculate the cumulative
> distribution function (CDF) using those parameters.
>
> For going from L-moments to Pearson parameters I've found a function
> in the source for hydroclimpy (the _lmparams_pearson3 function in
> trunk/hydroclimpy/scikits/hydroclimpy/stats/lmoments.py) which might
> do the trick, although it uses L-statistics rather than L-moments as
> its input, but I assume that that is an easy conversion. Is this a
> good approach, or is there a better/more standard way of doing this?
hydroclimpy is still the only package that has L-statistics/ L-moments
in python (AFAIK)
Given that the fortran source is from the main L-moment person, I
assume it works.
I don't remember whether I read anything about fitting a pearson3
distribution, but for other distributions there are alternative
estimators (not L-moment based) that do at least as well in simulation
studies.
(But I haven't looked at this in a while.
And I also never figured out whether it's worth keeping L-moments in
Fortran or whether it could just be translated into numpython)
>
> The next step is to find a function that calculates the CDF for a
> Pearson Type III distribution. It looks like I'll need to make sure
> that I have a Pearson Type III continuous distribution installed, is
> this correct? If so then where can I find these distribution classes
> for installation, and/or how can I confirm that these are properly
> installed?
As far as I could figure out Pearson 3 is just a reparameterized
generalized gamma distribution,
and it should be possible to use scipy.stats.distributions.
An explicit Pearson 3 will come to scipy ( I assume )
https://github.com/scipy/scipy/pull/336
(I think I lost track of this one, and never checked the latest changes)
Hopefully someone has more specific information about using L-moments
and Pearson 3.
Josef
>
> Thanks in advance for any suggestions or comments. I'm a new Python
> programmer and new to doing this kind of math; my apologies if this is
> too much of an open-ended/beginner's question.
>
> --James
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
More information about the SciPy-User
mailing list