Performs a Multivariate (Multisite) Mann-Kendall test.
mult.mk.test(x, alternative = c("two.sided", "greater", "less"))
An object with class "htest"
character string that denotes the input data
the p-value for the entire series
the z quantile of the standard normal distribution for the entire series
the null hypothesis
the estimates S and varS for the entire series
the alternative hypothesis
character string that denotes the test
the variance - covariance matrix
a time series object of class "ts"
the alternative hypothesis, defaults to two.sided
The Mann-Kendall scores are first computed for each variate (side) seperately.
$$ S = \sum_{k = 1}^{n-1} \sum_{j = k + 1}^n \mathrm{sgn}\left(x_j - x_k\right)$$
with \(\mathrm{sgn}\) the signum function (see sign
).
The variance - covariance matrix is computed according to Libiseller and Grimvall (2002).
$$ \Gamma_{xy} = \frac{1}{3} \left[K + 4 \sum_{j=1}^n R_{jx} R_{jy} - n \left(n + 1 \right) \left(n + 1 \right) \right]$$
with
$$ K = \sum_{1 \le i < j \le n} \mathrm{sgn} \left\{ \left( x_j - x_i \right) \left( y_j - y_i \right) \right\}$$
and
$$ R_{jx} = \left\{ n + 1 + \sum_{i=1}^n \mathrm{sgn} \left( x_j - x_i \right) \right\} / 2$$
Finally, the corrected z-statistics for the entire series is calculated as follows, whereas a continuity correction is employed for \(n \le 10\):
$$ z = \frac{\sum_{i=1}^d S_i}{\sqrt{\sum_{j=1}^d \sum_{i=1}^d \Gamma_{ij}}} $$
where
\(z\) denotes the quantile of the normal distribution \(S\) is the vector of Mann-Kendall scores for each variate (site) \(1 \le i \le d\) and \(\Gamma\) denotes symmetric variance - covariance matrix.
Hipel, K.W. and McLeod, A.I. (1994), Time Series Modelling of Water Resources and Environmental Systems. New York: Elsevier Science.
Lettenmeier, D.P. (1988), Multivariate nonparametric tests for trend in water quality. Water Resources Bulletin 24, 505--512.
Libiseller, C. and Grimvall, A. (2002), Performance of partial Mann-Kendall tests for trend detection in the presence of covariates. Environmetrics 13, 71--84, tools:::Rd_expr_doi("10.1002/env.507").