Mann-Kendall Test vs Ordinary Linear Regression

This plot shows a javascript implementation of the Mann-Kendall test. Given a list of observations by year, our function returns an array of results (the Sen's slope, intercept, trend, p, etc) that we can use to describe the trend over time. These observations are plotted in color on the plot to the left, with the Sen's slope as a dashed line.

This particular data series has a longer period of record than we are using in our analysis, so we add these observations and fit another less vibrant line.

Finally, the table below shows our javascript regression results and the python results from pymannkendall.original_test(). Results from scipy.stats.mstats.kendalltau() are similar.

Analysis window 2001 to 2012

The Mann-Kendall test is less sensitive to outliers and missing values than the ordinary linear regression, so we use this test with the Theil-Sen slope to estimate trends in data with these problems.

This second plot shows the Theil-Sen slopes from above overlaid with the ordinary linear regression for our analysis window and the full dataset. Bands around the trend line show the 0.95 confidence intervals. The table below shows the results of both methods for the full record and the selected analysis window.

Use the slider above the plot to change the starting year of the analysis window.

series full record short record
method ordinary linear ordinary linear
slope
intercept
rsquared
trend
p-value
series full record short record
method mann-kendall mann-kendall
slope
intercept
trend
h
p-value
z
Tau
s
var_s