[ncl-talk] trend_manken

Dennis Shea shea at ucar.edu
Mon May 11 18:35:17 MDT 2015


The "exact equations behind the 'probability" are

      IF (s.gt.zero) then
          z = (s-1d0)/sqrt(var)
      ELSEIF (s.lt.zero) then
          z = (s+1d0)/sqrt(var)
      ELSE
          z = zero
      END IF

      prob = erf(abs(z)/sqrt(2d0))

I will send you the code used offline.

====
I added the following to the documentation:

Example 1 ...

     c  = (/-1,2,-3,4,-5,6,-7,8,-9,10,-11,12/)
     pc = *trend_manken*(c, False, 0)     ; pc(0)=*0.2683*,   pc(1)=1.0

 For comparison, on the last example R (after loading the 'Kendall'
library) returns:

    < *library(Kendall)*
    > 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

      tau = 0.0909, 2-sided pvalue =*0.7317*    (Note: 1-0.7317=
*0.2683* which matches NCL)

The NCL function does *not* return the Mann-Kendall 'tau' statistic....
just the probability (1-p)


On Fri, Apr 10, 2015 at 6:26 AM, Hilde Fagerli <h.fagerli at met.no> wrote:

>
> Hi,
>
> I am using ncl 6.3.0 and the function trend_manken.
> In the documentation (
> https://www.ncl.ucar.edu/Document/Functions/Built-in/trend_manken.shtml)
> it says that the output is
> 'probability' and the 'Theil Sen trend estimate'.
>
> What is this 'probability' and how is it calculated? Can you conclude from
> it whether a trend exists or not? Does it take into account the MK test
> statistics (I have more than 10 calues)?
>
> The web page refers to
> http://vsp.pnnl.gov/help/Vsample/Design_Trend_Mann_Kendall.htm, but even
> after reading this it is not really clear to me what this probability that
> is calculated refers to.
>
> I would be very grateful if anybody can help - for instance refer to the
> exact equations behind the 'probability'.
>
>
> Best regards
> Hilde Fagerli
> _______________________________________________
> ncl-talk mailing list
> 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/20150512/dc1c7887/attachment.html 


More information about the ncl-talk mailing list