bfast {bfast} | R Documentation |
Iterative break detection in seasonal and trend component of a time series. Seasonal breaks is a function that combines the iterative decomposition of time series into trend, seasonal and remainder components with significant break detection in the decomposed components of the time series.
bfast(Yt, h = 0.15, max.iter = NULL, breaks = NULL)
Yt |
univariate time series to be analyzed. This should be an object of class "ts" with a frequency greater than one without NA's. |
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. |
max.iter |
maximum amount of iterations allowed for estimation of breakpoints in seasonal and trend component. |
breaks |
integer specifying the maximal number of breaks to be calculated. By default the maximal number allowed by h is used. |
To be completed.
An object of the class "bfast" is a list with the following elements:
Yt |
equals the Yt used as input. | ||||||||||||||||||
output |
is a list with the following elements (for each iteration):
| ||||||||||||||||||
nobp |
is a list with the following elements:
| ||||||||||||||||||
magnitude |
magnitude of the biggest change detected in the trend component | ||||||||||||||||||
Time |
timing of the biggest change detected in the trend component |
Jan Verbesselt
Verbesselt, J., R. Hyndman, G. Newnham, and D. Culvenor (In Press). Detecting trend and seasonal changes in satellite image time series. Remote Sensing of Environment. http://dx.doi.org/10.1016/j.rse.2009.08.014. Or see http://robjhyndman.com/papers/bfast1.
plot.bfast
for plotting of bfast() results.
breakpoints
for more examples and background information about estimation of breakpoints in time series.
# Simulated Data plot(simts) # stl object containing simulated NDVI time series datats <- ts(rowSums(simts$time.series)) # sum of all the components (season,abrupt,remainder) tsp(datats) <- tsp(simts$time.series) # assign correct time series attributes plot(datats) fit <- bfast(datats,h=0.15,max.iter=1) plot(fit,sim=simts) fit # prints out whether breakpoints are detected in the seasonal and trend component # Real data # The data should be a regular ts() object without NA's # See Fig. 8 b in reference plot(harvest, ylab='NDVI') # MODIS 16-day cleaned and interpolated NDVI time series fit <- bfast(harvest,h=0.15,max.iter=1,breaks=2) plot(fit) plot(fit,type="trend",largest=TRUE) plot(fit,type="all")