<div dir="ltr"><div>From Example 1 which compares NCL's <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/trend_manken.shtml"><b>trend_manken</b></a> with results an <b>R</b> function<br></div><div><pre> c = (/-1,2,-3,4,-5,6,-7,8,-9,10,-11,12/)
pc = <strong>trend_manken</strong>(c, False, 0) ; pc(0)=<span style="color:rgb(0,0,255)"><b>0.2683</b></span>, pc(1)=1.0
</pre>
<p>
For comparison, on the last example R (after loading the 'Kendall' library) returns:
</p><pre> < <b>library(Kendall)</b>
> q <- c(-1,2,-3,4,-5,6,-7,8,-9,10,-11,12)
> x <- c(1,2,3,4,5,6,7,8,9,10,11,12)
> qx <-Kendall(x,y)
> qx
R returns
tau = 0.0909, <span style="color:rgb(0,0,255)"><b>2-sided </b></span>pvalue =<b>0.7317</b> (Note: 1-0.7317= <span style="color:rgb(0,0,255)"><b>0.2683</b></span> which matches NCL)<br>====<br><br></pre><pre>So two-sided <br>====<br></pre><pre>Run the above example in Python. That should give you a baseline comparison.<br>*******************************************************************************<br>Another R example: <a href="https://www.statology.org/mann-kendall-trend-test-r/"><b>https://www.statology.org/mann-kendall-trend-test-r/</b></a><br>*******************************************************************************<br><br>prc = (/31.69,29.77,31.70,33.06,31.31,32.72,31.18,29.90,29.17,31.48,28.11,32.61 \<br> ,31.31,30.96,28.40,30.68,33.67,28.65,30.62,30.21,28.79,30.92,30.92,28.13 \<br> ,30.51,27.63,34.80,32.10,33.86,32.33,25.69,30.60,32.85,30.31,27.71,30.34 \<br> ,29.14,33.41,33.51,29.90,32.69,32.34,35.01,33.05,31.15,36.36,29.83,33.70 \<br> ,29.81,32.41,35.90,37.45,30.39,31.15,35.75,31.14,30.06,32.40,28.44,36.38 \<br> ,31.73,31.27,28.51,26.01,31.27,35.57,30.85,33.35,35.82,31.78,34.25,31.43 \<br> ,35.97,33.87,28.94,34.62,31.06,38.84,32.25,35.86,32.93,32.69,34.39,33.97 \<br> ,32.15,40.16,36.32/)<br><br> pc = <b>trend_manken(</b>prc, False, 0)<br> print(pc)<br> print("============")<br> <b>PC = 1-pc(0)</b><br> print("PC=1-pc(0)="+PC)<br><br>Variable: pc<br>Type: float<br>Total Size: 8 bytes<br> 2 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [2]<br>Coordinates: <br>(0) 0.9997079<br>(1) 0.03999999<br>(0) ============<br>(0) <span style="color:rgb(0,0,255)"><b>PC=1-pc(0)=0.000292063 <=== matches R</b></span></pre></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jan 2, 2021 at 11:45 PM Ipsita Putatunda via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear ncl users,<div>I have gone through the function trend_manken, but I have few doubts as follows-</div><div>The probability we are getting from this function is two-tailed or one-tailed?</div><div>Using this function I am getting one of my trend probability 0.97 whereas using python I am getting the value <font face="Calibri, sans-serif"><span style="font-size:14.6667px">0.022 which is giving a significantly strong trend.</span></font></div><div>Any help in this regard would be highly appreciated.</div><div><br></div><div>Thanking you,</div><div>Ipsita</div><div><font face="Calibri, sans-serif"><span style="font-size:14.6667px"><br></span></font></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>