PURPOSE
This app can be used to perform Mann-Kendall test to determine whether input data has a monotonic upward or downward trend.
INSTALLATION
Download the file Mann-Kendall_Test.opx, and then drag-and-drop onto the Origin workspace. An icon will appear in the Apps Gallery window.
NOTE: This tool requires OriginPro.
OPERATION
- Make a worksheet with a time series active. Click on the Mann-Kendall Test icon in the Apps Gallery window. A dialog will open.
- In the opened dialog, keep default settings, and click OK button. A report will be created. The Test Statistics table lists the P-value and draws a conclusion in the footnote.
Note that if the number of points is no more than 10, the normal distribution can't be assumed. And P-value can't be calculated.
SAMPLE OPJU FILE
This app provides a sample OPJU file. Right click on the Mann-Kendall Test icon in the Apps Gallery window, and choose Show Samples Folder from the short-cut menu. A folder will open. Drag-and-drop the project file MKSample.opju from the folder onto Origin. The Notes window in the project shows detailed steps.
Note: If you wish to save the OPJU after changing, it is recommended that you save to a different folder location (e.g. User Files Folder).
ALGORITHM
- Mann-Kendall Test
Statistic: \(S=\displaystyle \sum_{i=1}^{n-1} \displaystyle \sum_{j=i+1}^{n} sign(x_j - x_i)\)
Variance: \(var=\frac{1}{18}[n(n-1)(2n+5)-\displaystyle \sum_t f_t(f_t-1)(2f_t+5)]\)
where n is size along the time direction, and t is the set of tied ranks, and ft is number of times for the tied rank.
Normal distribution z for n>10: \(z=\begin{cases} \frac{S-1}{\sqrt{var}} , & S>0 \\ 0 , & S=0 \\ \frac{S+1}{\sqrt{var}} , & S<0 \end{cases}\)