TrendSeasonalAdjusted {greenbrown}R Documentation

Trend estimation based on seasonal-adjusted time series

Description

The function computes and substracts the seasonal cycle from a time series. Then a trend is estimated on the seasonal-adjusted time series. The function can be applied to gridded (raster) data using the function TrendRaster. A detailed description of this method can be found in Forkel et al. (2013).

Usage

TrendSeasonalAdjusted(Yt, mosum.pval = 0.05, h = 0.15, breaks = NULL, 
    funSeasonalCycle = MeanSeasonalCycle)

Arguments

Yt

univariate time series of class ts

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 sctest for details.

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 breakpoints for details.

breaks

maximal number of breaks to be calculated (integer number). By default the maximal number allowed by h is used. See breakpoints for details.

funSeasonalCycle

a function to estimate the seasonal cycle of the time series. A own function can be defined to estimate the seasonal cycle which has to return the seasonal cycle as a time series of class "ts". Currently two approaches are part of this package:

  • MeanSeasonalCycle is the default which computes the average seasonal cycle from all years.

  • SSASeasonalCycle can be used which detects a modulated seasonal cycle based on Singular Spectrum Analysis.

Value

The function returns a list of class "Trend".

Author(s)

Matthias Forkel <matthias.forkel@geo.tuwien.ac.at> [aut, cre]

References

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.

See Also

Trend, TrendRaster, MeanSeasonalCycle, SSASeasonalCycle

Examples

# load a time series of NDVI (normalized difference vegetation index)
data(ndvi)
plot(ndvi)
	
# calculate trend on time series with removed mean seasonal cycle
MACtrend <- TrendSeasonalAdjusted(ndvi, funSeasonalCycle=MeanSeasonalCycle)
MACtrend
plot(MACtrend)

# plot the seasonal-adjusted time series
plot(ndvi)
lines(MACtrend$adjusted, col="orange")

# calculate trend on time series with removed mean seasonal cycle 
# but with limited number of breakpoints
MACtrend <- TrendSeasonalAdjusted(ndvi, breaks=1, funSeasonalCycle=MeanSeasonalCycle)
MACtrend
plot(MACtrend)

## calculate trend on time series with removed seasonal cycle but seasonal cycle computed based 
## on singular spectrum analysis
#SSAtrend <- TrendSeasonalAdjusted(ndvi, funSeasonalCycle=SSASeasonalCycle)
#SSAtrend 
#plot(SSAtrend)
#lines(SSAtrend$adjusted, col="orange")



[Package greenbrown version 2.4.3 Index]