<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
As far as I can tell, the NCL-computed GEV parameters based on MLE do not match prior studies' results.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I say that with the huge caveat that I am not a GEV expert.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
For example, based on the annual max values for 1950-2014 in Table 1 of this paper:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<a href="https://www.researchgate.net/publication/288991817_Predicted_Return_Level_of_Annual_Maximum_Earthquake_in_Northern_California/link/56881a6208aebccc4e155539/download" id="LPNoLPOWALinkPreview">https://www.researchgate.net/publication/288991817_Predicted_Return_Level_of_Annual_Maximum_Earthquake_in_Northern_California/link/56881a6208aebccc4e155539/download</a><br>
</div>
<div class="_Entity _EType_OWALinkPreview _EId_OWALinkPreview _EReadonly_1"></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
the location, scale, and shape parameters are 5.62, 0.54, and -0.098, respectively, in Table 2.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
When I perform this task below with those data values,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
yearmax=(/5.3,5.8,7.2,6.1,6.3,5.8,5.8,5.8,5.5,5.5,5.7,6.4,5.5,5.5,5.1,6.0,5.0, \
<div>          5.3,6.0,6.2,5.6,5.8,6.0,5.3,7.2,5.5,6.0,5.4,4.9,6.3,6.2,5.6,5.6,5.4, \</div>
<div>          5.5,5.0,6.0,5.6,5.9,5.7,5.4,5.2,5.2,5.0,5.2,5.7,6.3,5.0,5.8,5.8,6.9, \</div>
<div>          5.9,5.5,6.7,6.6,5.6,6.6,6.8,6.0,6.6,6.3,6.6,7.7,6.2,6.8,6.3,5.6,5.6, \</div>
<div>          5.5,7.3,6.1,6.6,5.9,6.5,6.0,7.0,5.0,5.5,5.4,4.9,6.5,4.7,5.6,5.7,6.8/)</div>
<span>param=extval_mlegev(yearmax,0,False)</span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>print(param)</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>I get the following, which does not match the results from the study at all.</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>(0) 3.7994          location
<div>(1) 2.233068      scale</div>
<span>(2) 0.4374145    shape</span><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><span><br>
</span></span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><span>Is there anyone with experience with GEV and NCL that can offer some insights?</span></span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><span><br>
</span></span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><span>Thanks, </span></span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><span>Michael</span></span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><span><br>
</span></span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><br>
</span></div>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
Michael Notaro<br>
<div>Associate Director<br>
</div>
<div>Nelson Institute Center for Climatic Research<br>
</div>
<div>University of Wisconsin-Madison<br>
</div>
<div>Phone: (608) 261-1503<br>
</div>
<div>Email: mnotaro@wisc.edu<br>
</div>
</div>
</div>
</div>
</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Dennis Shea <shea@ucar.edu><br>
<b>Sent:</b> Wednesday, November 17, 2021 9:58 AM<br>
<b>To:</b> Michael Notaro <mnotaro@wisc.edu><br>
<b>Cc:</b> ncl-talk@ucar.edu <ncl-talk@ucar.edu><br>
<b>Subject:</b> Re: [ncl-talk] GEV assistance needed</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Hi Michael,</div>
<div><br>
</div>
<div>Not sure I can help on this. I am not very knowledgeable on MLE or GEV   <br>
</div>
<div><br>
</div>
<div>As noted in the documentation, NCL invokes a August 1994 version of:<br>
</div>
<div><br>
</div>
<div>Algorithm 215: Maximum-Likelihood Estimation of the Parameters of the Generalized Extreme-Value Distribution</div>
<div>
<pre>J. R. M. Hosking
  Journal of the Royal Statistical Society. Series C (Applied Statistics) 
  Vol. 34, No. 3 (1985), pp. 301-310
  URL:  <a href="http://www.jstor.org/stable/2347483">http://www.jstor.org/stable/2347483</a>
  Code: <a href="http://ftp.uni-bayreuth.de/math/statlib/apstat/215"><b>http://ftp.uni-bayreuth.de/math/statlib/apstat/215</b></a><br><br></pre>
<pre>My recollection is that we tested this on a few 'book' examples and compared the output to results generated by R's <b>gev.fit </b>function<b>.<br><br>====<br></b></pre>
<pre><a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/extval_mlegev.shtml"><b>extval_mlegev</b></a>: Example 1 illustrates a comparison.  I believe you have used R.  Perhaps trying your data using R <br>will provide another (NCL, MATLAB) viewpoint.<br><br>====<br></pre>
<pre>Again, I am not very knowledgeable on either MLE or GEV so I have no idea what the -1 does within the algorithm.<br><br></pre>
<pre>Regards<br></pre>
<pre>D<br></pre>
<pre><b><br></b>
</pre>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Tue, Nov 16, 2021 at 3:24 PM Michael Notaro via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
In the example below, I have 20 values of precipitation in inches.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Each value is the highest daily precipitation for one of 20 years.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I want to estimate the 1-day/100-year GEV precipitation level.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
For some reason, my older script included multiplying the shape</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
parameter by -1.  That gave a GEV value of 65757", definitely wrong.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
If I get rid of the *-1 part, the GEV value becomes more reasonable,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
1.73", but too low compared to the 20 annual max values.  So I have</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
two questions.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<ol>
<li>Is there something wrong with the script below?<span></span></li><li>Is there ever a need to multiply any of the parameters by -1?  I</li><li style="display:block">did it once before but have no recollection of why I did it.</li></ol>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Thanks, Michael</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
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/)
<div>param=extval_mlegev(yearmax,0,False)</div>
<div>param_mle_location=param(0)</div>
<div>param_mle_scale=param(1)</div>
<div>param_mle_shape=param(2)*-1.</div>
<div>coeff=-1.*log(1.-1./100.)</div>
<div>gev=param_mle_scale/param_mle_shape*[coeff^(-1.*param_mle_shape)-1.]+param_mle_location</div>
<span>print("param_mle_location="+param_mle_location+"  param_mle_scale="+param_mle_scale+"  param_mle_shape="+param_mle_shape+"  coeff="+coeff+"  gev= "+gev)</span><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span><br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="background-color:rgb(255,255,0)">param_mle_location=1.65715  param_mle_scale=0.216018  param_mle_shape=2.98224  coeff=0.0100503  gev= 65757.5</span><span><br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span><br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span><span style="background-color:rgb(255,255,255); display:inline">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/)</span>
<div style="margin:0px; background-color:rgb(255,255,255)">param=extval_mlegev(yearmax,0,False)</div>
<div style="margin:0px; background-color:rgb(255,255,255)">param_mle_location=param(0)</div>
<div style="margin:0px; background-color:rgb(255,255,255)">param_mle_scale=param(1)</div>
<div style="margin:0px; background-color:rgb(255,255,255)">param_mle_shape=param(2)*-1.</div>
<div style="margin:0px; background-color:rgb(255,255,255)">coeff=-1.*log(1.-1./100.)</div>
<div style="margin:0px; background-color:rgb(255,255,255)">gev=param_mle_scale/param_mle_shape*[coeff^(-1.*param_mle_shape)-1.]+param_mle_location</div>
<span style="margin:0px; background-color:rgb(255,255,255)">print("param_mle_location="+param_mle_location+"  param_mle_scale="+param_mle_scale+"  param_mle_shape="+param_mle_shape+"  coeff="+coeff+"  gev= "+gev)</span><br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span><span style="margin:0px; background-color:rgb(255,255,255)"><br>
</span></span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span><span style="margin:0px; background-color:rgb(255,255,0)">param_mle_location=1.65715  param_mle_scale=0.216018  param_mle_shape=-2.98224  coeff=0.0100503  gev= 1.72958</span><span style="margin:0px; background-color:rgb(255,255,255)"><br>
</span></span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span><span style="margin:0px; background-color:rgb(255,255,255)"><br>
</span></span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span><br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span><br>
</span></div>
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div id="x_gmail-m_4840502285418351531Signature">
<div>
<div id="x_gmail-m_4840502285418351531divtagdefaultwrapper" style="font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255); font-family:Calibri,Arial,Helvetica,sans-serif">
Michael Notaro<br>
<div>Associate Director<br>
</div>
<div>Nelson Institute Center for Climatic Research<br>
</div>
<div>University of Wisconsin-Madison<br>
</div>
<div>Phone: (608) 261-1503<br>
</div>
<div>Email: <a href="mailto:mnotaro@wisc.edu" target="_blank">mnotaro@wisc.edu</a><br>
</div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote>
</div>
</div>
</div>
</body>
</html>