M-K Analysis Code for Trend Detection and Change Point Identification

Resource Overview

Comprehensive M-K analysis implementation featuring trend detection and change point testing algorithms, with easily customizable data input for various analytical applications

Detailed Documentation

This code implements the Mann-Kendall (M-K) analysis method for trend detection and change point identification. The implementation includes not only the core M-K statistical procedures but also integrates supplementary analytical techniques such as Sen's slope estimator for trend magnitude quantification and Pettitt's test for abrupt change point detection. Users can simply replace the sample dataset with their own time-series data to generate customized analytical results. The codebase features extensive inline documentation explaining key functions like the MK_test() function that calculates the standardized test statistic and variance, trend_calc() that computes progressive trend analysis, and change_point_detection() that implements sequential regime shift identification. Additional helper functions provide data preprocessing and visualization capabilities, making the toolkit suitable for hydrological, climatic, and environmental time-series analysis.