Trend {greenbrown}  R Documentation 
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).
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 
method to be used for trend calculation with the following options:

mosum.pval 
Maximum pvalue for the OLSMOSUM test in order to search for breakpoints. If p = 0.05, breakpoints will be only searched in the time series trend component if the OLSMOSUM 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 breaks to be calculated (integer number). By default the maximal number allowed by h is used. See 
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@geo.tuwien.ac.at> [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 InterAnnual Variability and Methodology.  Remote Sensing 5.
plot.Trend
, TrendAAT
, TrendSTM
, TrendSeasonalAdjusted
, TrendRaster
, breakpoints
# load a time series of NDVI (normalized difference vegetation index) data(ndvi) plot(ndvi) # 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 pvalue 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