The code performs two tailed Mann-Kendall test modified to account for autocorrelation on the time series (Hamed and Rao, 1998).
The null hypothesis of trend absence in the vector V is tested, against the alternative of trend. The result of the test is returned in H = 1 indicates a rejection of the null hypothesis at the alpha significance level. H = 0 indicates a failure to reject the null hypothesis at the alpha significance level.
Hi, how can i get the Z value ? thanks
Hi I am using this code for my analysis so are the comments true. Do we need to correct the code or its good to go without modification of the code for
"I = tiedrank(V);". please reply
in complement to comment of Jens Wilhelmi and Md. Manjurul, if you don't want ranks for tied values to be not averaged, you can use [~,~,I]=unique(V).
Jens Wilhelmi is right. Line 70
"[V,I]=sort(V); %% I = ranks"
is replace by
"I = tiedrank(V);"
There seems to be a bug in
[V,I]=sort(V); %% I = ranks
IMHO the variable "I" contains the indexes of the values of "V"
rather than the ranks.
From my side of view
I = tiedrank(V);
should be used here instead.
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.