Description Usage Arguments Value Author(s) See Also Examples
The function call MannKendall
for different segments of a time series
1 2 | MannKendallSeg(Yt, seg = NULL,
bp = NoBP())
|
Yt |
univariate time series of class |
seg |
a vector indicating segments of a time series. If NULL, provide |
bp |
detected breakpoints in the time series as returned by |
The function returns a data.frame with the estimated Mann-Kendall tau and p-value for each segment of the time series.
Matthias Forkel <matthias.forkel@tu-dresden.de> [aut, cre]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # aggregate time series to annual time steps
ndvi <- aggregate(ndvi, FUN=mean)
plot(ndvi)
# MannKendall test for different segments
seg <- c(rep(1, length(start(ndvi)[1]:1995)), rep(2, length(1996:end(ndvi)[1])))
mk <- MannKendallSeg(ndvi, seg)
mk
# MannKendall test for segments that are defined by breakpoints
bp <- breakpoints(ndvi ~ time(ndvi))
mk <- MannKendallSeg(ndvi, bp=bp)
mk
# MannKendall test without segments
MannKendallSeg(ndvi)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.