The Mann-Kendall test requires a number of elements to be calculated or set, including alpha, n, S, freq, se, z-stat, and p-value. Each of these elements is a measure within our recipe, and each is explained in turn here.
The first measure, alpha, is the significance level. In statistics, this generally defaults to 0.05, so we simply set our alpha variable to .05.
The second measure, n, is simply the count of the number of observations, or rows in our data table, R05_Table. We simply use COUNTROWS to compute this value.
The next element, measure S, is much more tricky to calculate. The formula for S is as follows:
To implement ...