pyMannKendall icon indicating copy to clipboard operation
pyMannKendall copied to clipboard

Variance in correlated seasonal MK test

Open alacima opened this issue 2 years ago • 0 comments

Hi,

I've been using your library to perform several MK tests and may have found a missing term in the function correlated_multivariate_test(). According to Hipel & McLeod (1994) for a correlated seasonal MK test the variance is computed as follows (Eq. 23.3.12):

image

Where the 2nd summation term of the equation is zero when no correlation is present in the time series. In the function correlated_multivariate_test() this 2nd summation is represented by the variable Gamma and computed as follows (Eq. 23.3.21):

image

But after that, the variance (var_s) for the correlated seasonal MK test is obtained with np.sum(Gamma) and the 1st summation term (which is included in the seasonal MK test without correlation) is not accounted for. Thus, shouldn't the variance in correlated_multivariate_test() include both terms (assuming no ties nor missing values):

image

Thank you in advance!

Aleks

alacima avatar Jun 30 '22 10:06 alacima