Description Usage Arguments Details Value Author(s) References See Also Examples
This function calculates trends and trend changes (breakpoints) in a time series. It is a common interface to the functions TrendAAT
, TrendSTM
and TrendSeasonalAdjusted
. With TrendRaster
all trend analysis functions can be applied to gridded (raster) data. A detailed description of these methods can be found in Forkel et al. (2013).
1 2 3 4 5 6 | Trend(Yt, method = c("AAT",
"STM", "SeasonalAdjusted",
"RQ"), mosum.pval = 0.05,
h = 0.15, breaks = NULL,
funSeasonalCycle = MeanSeasonalCycle,
funAnnual = mean)
|
Yt |
univariate time series of class |
method |
|
mosum.pval |
Maximum p-value for the OLS-MOSUM test in order to search for breakpoints. If p = 0.05, breakpoints will be only searched in the time series trend component if the OLS-MOSUM test indicates a significant structural change in the time series. If p = 1 breakpoints will be always searched regardless if there is a significant structural change in the time series or not. See |
h |
minimal segment size either given as fraction relative to the sample size or as an integer giving the minimal number of observations in each segment. See |
breaks |
maximal number of |
funSeasonalCycle |
a function to estimate the seasonal cycle of the time series if
|
funAnnual |
function to aggregate time series to annual values if |
This function allows to calculate trends and trend changes based on different methods: see TrendAAT
, TrendSTM
or TrendSeasonalAdjusted
for more details on these methods.
These methods can be applied to gridded (raster) data using the function TrendRaster
.
The function returns a list of class "Trend".
Matthias Forkel <matthias.forkel@tu-dresden.de> [aut, cre]
Forkel, M., N. Carvalhais, J. Verbesselt, M. Mahecha, C. Neigh and M. Reichstein (2013): Trend Change Detection in NDVI Time Series: Effects of Inter-Annual Variability and Methodology. - Remote Sensing 5.
plot.Trend
, TrendAAT
, TrendSTM
, TrendSeasonalAdjusted
, TrendRaster
, breakpoints
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | # calculate trend (default method: trend calculated based on annual aggregated data)
trd <- Trend(ndvi)
trd
plot(trd)
# an important parameter is mosum.pval: if the p-value is changed to 1,
# breakpoints can be detected in the time series regardless if
# there is significant structural change
trd <- Trend(ndvi, mosum.pval=1)
trd
plot(trd)
# calculate trend based on modelling the seasonal cycle
trd <- Trend(ndvi, method="STM")
trd
plot(trd)
# calculate trend based on removal of the seasonal cycle
trd <- Trend(ndvi, method="SeasonalAdjusted", funSeasonalCycle=MeanSeasonalCycle)
plot(trd)
lines(trd$adjusted, col="green")
trd
# modify maximal number of breakpoints
trd <- Trend(ndvi, method="SeasonalAdjusted", breaks=1)
plot(trd)
trd
# use quantile regression
trd <- Trend(ndvi, method="RQ")
plot(trd)
trd
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.