Work

The all-lags Yue–Wang modified Mann–Kendall test in common software: a persistent default that inflates trend significance

Year: 2026
Type: preprint
Abstract: The Yue and Wang (2004) variance-corrected Mann–Kendall test is widely used to account for serial correlation in hydroclimatic trend analysis. In the two most widely used free implementations, the Python package pymannkendall (yue_wang_modification_test, default lag=None) and the R package modifiedmk (mmky, versions 1.1.0 onward), the correction factor is built from the sample autocorrelation of the detrended series at every lag from 1 to n−1, with no screening. We show that this estimator does not measure serial dependence. It equals a scaled sum of squared partial sums of the residuals, has expectation (n+1)/(3n) ≈ 1/3 for independent data before detrending, and falls further (median ≈ 0.13 at n = 100) after Sen-slope detrending. In trend-free Monte Carlo experiments the default flags 43–49% of white-noise series as significant at the 5% level, and 46–59% of AR(1) series, compared with about 5% for the uncorrected test on white noise. The problem was reported in simulation by O'Brien et al. (2021), but both software defaults remain unchanged. A citation search identified 85 candidate studies; about 17 distinct analyses rest headline significance claims on the default, two confirmed from the authors' public code. Re-running one of them, a satellite study of chlorophyll trends in the German Bight, reduces the area of significant decline from 55% to 23–25% with calibrated tests, and to 14–18% with field-significance control. We recommend changing both defaults and re-examining affected results.
Language: English
Open Access status: green
OpenAlex ID: W7225401917
Cites:
Cited by:
Related to: 10