Partial Mann-Kendall Trend Test
Performs a partial Mann-Kendall Trend Test
partial.mk.test(x, y, alternative = c("two.sided", "greater", "less"))
x |
a "vector" or "ts" object that contains the variable, which is tested for trend (i.e. correlated with time) |
y |
a "vector" or "ts" object that contains the variable, which effect on "x" is partialled out |
alternative |
character, the alternative method; defaults to "two.sided" |
According to Libiseller and Grimvall (2002), the test statistic
for x
with its covariate y
is
z = (S[x] - r * S[y]) / √(1 - r^2) * n * (n - 1) * (2 * n + 5) / 18)
where the correlation r is calculated as:
r = σ / (n (n - 1) (2n + 5) / 18)
The conditional covariance between x and y is
σ_{xy} = \frac{1}{3} ≤ft[K + 4 ∑_{j=1}^n R_{jx} R_{jy} - n ≤ft(n + 1 \right) ≤ft(n + 1 \right) \right]
with
K = ∑_{1 ≤ i < j ≤ n} \mathrm{sgn} ≤ft\{ ≤ft( x_j - x_i \right) ≤ft( y_j - y_i \right) \right\}
and
R_{jx} = ≤ft\{ n + 1 + ∑_{i=1}^n \mathrm{sgn} ≤ft( x_j - x_i \right) \right\} / 2
A list with class "htest"
method |
a character string indicating the chosen test |
data.name |
a character string giving the name(s) of the data |
statistic |
the value of the test statistic |
estimate |
the Mann-Kendall score S, the variance varS and the correlation between x and y |
alternative |
a character string describing the alternative hypothesis |
p.value |
the p-value of the test |
null.value |
the null hypothesis |
Current Version is for complete observations only. The test statistic is not corrected for ties.
Libiseller, C. and Grimvall, A., (2002). Performance of partial Mann-Kendall tests for trend detection in the presence of covariates. Environmetrics 13, 71–84, http://dx.doi.org/10.1002/env.507.
data(maxau) s <- maxau[,"s"]; Q <- maxau[,"Q"] partial.mk.test(s,Q)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.