[ncl-talk] GEV assistance needed
Dennis Shea
shea at ucar.edu
Wed Nov 17 08:58:10 MST 2021
Hi Michael,
Not sure I can help on this. I am not very knowledgeable on MLE or GEV
As noted in the documentation, NCL invokes a August 1994 version of:
Algorithm 215: Maximum-Likelihood Estimation of the Parameters of the
Generalized Extreme-Value Distribution
J. R. M. Hosking
Journal of the Royal Statistical Society. Series C (Applied Statistics)
Vol. 34, No. 3 (1985), pp. 301-310
URL: http://www.jstor.org/stable/2347483
Code: *http://ftp.uni-bayreuth.de/math/statlib/apstat/215*
<http://ftp.uni-bayreuth.de/math/statlib/apstat/215>
My recollection is that we tested this on a few 'book' examples and
compared the output to results generated by R's *gev.fit *function
*.====*
*extval_mlegev*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/extval_mlegev.shtml>:
Example 1 illustrates a comparison. I believe you have used R.
Perhaps trying your data using R
will provide another (NCL, MATLAB) viewpoint.
====
Again, I am not very knowledgeable on either MLE or GEV so I have no
idea what the -1 does within the algorithm.
Regards
D
On Tue, Nov 16, 2021 at 3:24 PM Michael Notaro via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:
> In the example below, I have 20 values of precipitation in inches.
> Each value is the highest daily precipitation for one of 20 years.
> I want to estimate the 1-day/100-year GEV precipitation level.
> For some reason, my older script included multiplying the shape
> parameter by -1. That gave a GEV value of 65757", definitely wrong.
> If I get rid of the *-1 part, the GEV value becomes more reasonable,
> 1.73", but too low compared to the 20 annual max values. So I have
> two questions.
>
> 1. Is there something wrong with the script below?
> 2. Is there ever a need to multiply any of the parameters by -1? I
> 3. did it once before but have no recollection of why I did it.
>
> Thanks, Michael
>
> yearmax=(/1.83,1.69,3.24,1.99,1.69,1.79,2.78,1.70,4.85,2.35,3.37,1.72,3.96,2.35,2.29,3.33,3.97,3.53,3.11,1.69/)
>
> param=extval_mlegev(yearmax,0,False)
> param_mle_location=param(0)
> param_mle_scale=param(1)
> param_mle_shape=param(2)*-1.
> coeff=-1.*log(1.-1./100.)
>
> gev=param_mle_scale/param_mle_shape*[coeff^(-1.*param_mle_shape)-1.]+param_mle_location
> print("param_mle_location="+param_mle_location+"
> param_mle_scale="+param_mle_scale+" param_mle_shape="+param_mle_shape+"
> coeff="+coeff+" gev= "+gev)
>
> param_mle_location=1.65715 param_mle_scale=0.216018
> param_mle_shape=2.98224 coeff=0.0100503 gev= 65757.5
>
>
> earmax=(/1.83,1.69,3.24,1.99,1.69,1.79,2.78,1.70,4.85,2.35,3.37,1.72,3.96,2.35,2.29,3.33,3.97,3.53,3.11,1.69/)
> param=extval_mlegev(yearmax,0,False)
> param_mle_location=param(0)
> param_mle_scale=param(1)
> param_mle_shape=param(2)*-1.
> coeff=-1.*log(1.-1./100.)
>
> gev=param_mle_scale/param_mle_shape*[coeff^(-1.*param_mle_shape)-1.]+param_mle_location
> print("param_mle_location="+param_mle_location+"
> param_mle_scale="+param_mle_scale+" param_mle_shape="+param_mle_shape+"
> coeff="+coeff+" gev= "+gev)
>
> param_mle_location=1.65715 param_mle_scale=0.216018
> param_mle_shape=-2.98224 coeff=0.0100503 gev= 1.72958
>
>
>
>
> Michael Notaro
> Associate Director
> Nelson Institute Center for Climatic Research
> University of Wisconsin-Madison
> Phone: (608) 261-1503
> Email: mnotaro at wisc.edu
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20211117/7a38b4a1/attachment.html>
More information about the ncl-talk
mailing list