[ncl-talk] Extreme-Value Statistics

Dennis Shea shea at ucar.edu
Mon Oct 16 09:47:13 MDT 2017


Regarding NCL's Extreme Value Statistics function suite:

       http://www.ncl.ucar.edu/Applications/extreme_value.shtml

contains the following ... at the very top ...

"NCL has a small number of basic extreme value (EV) and recurrence
statistical functions. However, NCL is not *R* or *S+* or *Matlab* or *IDL*
or *Excel* or *Python's SciPy*. These tools contain many more EV related
functions. That said: *None of these tools are NCL either!"*

[1]
NCL function '*extval_mlegev*'  is an interface to the fortran subroutine:

C-----------------------------------------------------------------
c Algorithm AS 215
c Maximum-Likelihood Estimation of the Parameters of the Generalized
Extreme-Value Distribution
c J. R. M. Hosking
c Journal of the Royal Statistical Society. Series C (Applied Statistics)
c Vol. 34, No. 3 (1985), pp. 301-310
c Stable URL: http://www.jstor.org/stable/2347483
C-----------------------------------------------------------------

Why the differences between EASYFIT and NCL? I don't know specifically.
Usually, there is a first guess at the initial value of the parameters.
Then, there is an iteration method (here, steepest-ascent) before some
convergence constraints are met.

So, perhaps, different convergence criteria?  different number of maximum
iterations? ...

My speculation is that the resulting distribution differences are 'small.'

---------
Also, Example 1 (same flood data) at:
  http://www.ncl.ucar.edu/Document/Functions/Built-in/extval_mlegev.shtml

compares NCL's *mlegev *with the output from R

                  NCL

   (0)	487.1327           location
   (1)	308.7767           scale
   (2)	0.0936752          shape

          R
   [1] 487.07202252
   [2] 308.76501616
   [3] -0.09363131   <=== sign difference is due to the way
                          the function is defined.


The sign difference for the shape is due to the way the function is defined.

Example 1 shows the R library used. Maybe there are others?


This comparison looks pretty good to me!

===========================================================
[2]

Currently, NCL's Extreme Value library does not have a function
for estimating the parameters of the Pareto distribution. Only, two
max-liklihood parameter distribution functions are provided:


http://www.ncl.ucar.edu/Document/Functions/Ext_val/extval_mlegam.shtml
http://www.ncl.ucar.edu/Document/Functions/Ext_val/extval_mlegev.shtml

=====================================================
[3]

There is no percentile function (Inverse CDF) in NCL.

=====================================================

Really, supporting an entire Extreme Value library from within
NCL is 'kinda' beyond NCL's scope/mission. We have to pick-and-choose.

Good luck

D


On Mon, Oct 16, 2017 at 8:42 AM, IN <qphoton at gmail.com> wrote:

> Dear All,
>         I am using NCL for Extreme value statistics. I want to fit
>  generalized extreme value (GEV) distribution and  generalized pareto
> to my data.
>
> I started with example 6 on this page.
>
> https://www.ncl.ucar.edu/Applications/extreme_value.shtml
>
> and compared the results with EASYFIT from  www.mathwave.com using the
> river_flow data from the example.
>
> I used  extval_mlegev and got these values for center, scale and shape.
>
> 487.1327 , 308.7766  and 0.09367528
>
> However from Easyfit, I am getting these values (see attached pictures)
>
> 486.88, 322.72 and   -0.10936
>
> So my questions are :
> Why there is difference ? Both NCL and EASYFIT use Maximum-Likelihood
> Estimation for calculation of these paramters. Also I need to calculate
> these
> paramters for generalized pareto distribution. How can I do that with NCL?
>
> In addition, I have option in EASYFIT to get  95 percentile ( or any other
> percetile)
> from Inverse CDF (see last two pictures), Can I do similar statistic with
> NCL?
>
> Thanks in advance
> Best Regards
> Imran Nadeem
> BOKU, Vienna.
>
>
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171016/811c1832/attachment.html>


More information about the ncl-talk mailing list