Kendall (version 1.0)

MannKendall: Mann-Kendall trend test

Description

This is a test for monotonic trend in a time series z[t] based on the Kendall rank correlation of z[t] and t.

Usage

MannKendall(x)

Arguments

x
a vector of data, often a time series

Value

  • A list with class Kendall.
  • tauKendall's tau statistic
  • sltwo-sided p-value
  • SKendall Score
  • Ddenominator, tau=S/D
  • varSvariance of S
  • Generic function print.Kendall and summary.Kendall are provided to print the output.

Details

The test was suggested by Mann (1945) and has been extensively used with environmental time series (Hipel and McLeod, 2005). For autocorrelated time series, the block bootstrap may be used to obtain an improved test.

References

Davison, A.C. and Hinkley, D.V. (1997) Bootstrap Methods and Their Application. Cambridge University Press. Hipel, K.W. and McLeod, A.I., (2005). Time Series Modelling of Water Resources and Environmental Systems. Electronic reprint of our book orginally published in 1994. http://www.stats.uwo.ca/faculty/aim/1994Book/. Mann, H.B. (1945), Nonparametric tests against trend, Econometrica, 13, 245-259.

See Also

Kendall, SeasonalMannKendall tsboot

Examples

Run this code
# Annual precipitation entire Great Lakes
# The time series plot with lowess smooth suggests an upward trend
# The autocorrelation in this data does not appear significant.
# The Mann-Kendall trend test confirms the upward trend.
data(PrecipGL)
plot(PrecipGL)
lines(lowess(time(PrecipGL),PrecipGL),lwd=3, col=2)
acf(PrecipGL)
MannKendall(PrecipGL)
#
#Use block bootstrap 
library(boot)
z<-data(PrecipGL)
MKtau<-function(z) MannKendall(z)$tau
tsboot(PrecipGL, MKtau, R=200, l=5, sim="fixed")

Run the code above in your browser using DataCamp Workspace