Mann-Kendall Tau-b with Sen's Method (enhanced) (Scripts) Publisher's description
from Jeff Burkey
The Mann-Kendall Tau-b non-parametric function computes a coefficient representing strength and direction of a trend for equally spaced data
The Mann-Kendall Tau-b non-parametric function computes a coefficient representing strength and direction of a trend for equally spaced data. While you do not need the Statistics Toolbox to compute Taub, you do need it to test for significance. This function will compute Tau-b (now tau-a as well), significance (and the various supporting statistics), and also a non-parametric slope method: Sens Method.
Note: Statistics Toolbox is only needed in this function to test for significance. Otherwise, there is nothing required beyond Matlab itself.
Enhancements include: now supports a seasonal kendall trend test recently submitted (sktt.m). Will allow for multiple observations in the same time index. Confidence intervals are added for Sens slope. Also a plot can be turned on/off.
Second enhancement: test for anomalies in trends, fixes, and notifies the user. Reference is in the comments of the function.
Given the speed of computers today, avoiding loops in Matlab is not as important for some computations as it has been in the past. Nevertheless, writing functions without loops is a form of elegance I think some people may appreciate. As such, this function is written without any loops. Example syntax to use the function is:
[taub tau h sig Z S sigma sen n senplot cilower ciupper] = ktaub(datain, alpha,wantplot)
System Requirements:MATLAB 7.7 (R2008b)
Program Release Status: New Release
Program Install Support: Install and Uninstall