TrendSTM {greenbrown} | R Documentation |
The trend and breakpoint estimation in method STM is based on the classical additive decomposition model and is following the implementation as in the bfast
approach (Verbesselt et al. 2010, 2012). Linear and harmonic terms are fitted to the original time series using ordinary least squares regression. This method can be also used to detect breakpoints in the seasonal component of a time series. The function can be applied to gridded (raster) data using the function TrendRaster
.
TrendSTM(Yt, h = 0.15, breaks = NULL, mosum.pval = 0.05)
Yt |
univariate time series of class |
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. |
breaks |
maximal number of breaks to be calculated (integer number). By default the maximal number allowed by h is used. |
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 |
The function returns a list of class "Trend".
Matthias Forkel <matthias.forkel@geo.tuwien.ac.at> [aut, cre]
Verbesselt, J.; Hyndman, R.; Zeileis, A.; Culvenor, D., Phenological change detection while accounting for abrupt and gradual trends in satellite image time series. Remote Sensing of Environment 2010, 114, 2970-2980.
Verbesselt, J.; Zeileis, A.; Herold, M., Near real-time disturbance detection using satellite image time series. Remote Sensing of Environment 2012, 123, 98-108.
# load a time series of NDVI (normalized difference vegetation index) data(ndvi) plot(ndvi) # calculate trend trd <- TrendSTM(ndvi) trd plot(trd) # plot the fitted season-trend model plot(ndvi) lines(trd$fit, col="red")