A cumulative Mann-Kendall trend test.
Calculating p-values for monotonic trend of ordinal data sequences
(e.g. proteins) by a compound test based on Kendall's rank correlation.
Ref.: The DeltaProt toolbox at http://services.cbu.uib.no/software/deltaprot/
Use: pval = cumKendallTest(Q,pop,tail)
returns p-values for testing the hypothesis of no correlation, against the alternative that there is a non-zero correlation between the columns in the (MxN)-matrix Q and the M-vector pop.
If pval is small, say less than 0.01,then the trend is considered significantly different from zero.
The test treats NaNs in Q or pop as missing values, and removes them.
The case N=1 is the classical Mann-Kendall test.
Q: MxN-matris with M independent observation series
pop: M-vector with population membership defined by an ordinalvariable e.g. optimal growth temperature for each of the M observation series.
tail: The alternative hypothesis against which to compute p-values.
TAIL: Alternative Hypothesis
'ne': trend is not zero (default)
'gt': trend is greater than zero
'lt': trend is less than zero
pval: P-value. Remark: - or + sign used here to indicate direction of trend
cumKendall computes p-values using large-sample approximations.
Unless data is very short (small sample size), this approximation is adequate.
When there are ties in the data, the null distribution of Kendall's test
may not be symmetric. Computing a two-tailed p-value in such cases is
not well-defined, and p-values for the two-tailed test is computed by
doubling the more significant of the two one-tailed p-values.
Please, use the following reference:
Thorvaldsen, S. , Flå, T. and Willassen, N.P. (2010) DeltaProt: a software toolbox for comparative genomics. BMC Bioinformatics 2010, Vol 11:573.
Steinar Thorvaldsen (2022). Cumulative Mann-Kendall trend test (https://www.mathworks.com/matlabcentral/fileexchange/29813-cumulative-mann-kendall-trend-test), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!