bfast {bfast}R Documentation

Break detection in the seasonal and trend component of a univariate time series

Description

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.

Usage

bfast(Yt, h = 0.15, max.iter = NULL, breaks = NULL)

Arguments

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.

Details

To be completed.

Value

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):
Tt the fitted trend component
St the fitted seasonal component
Nt the noise or remainder component
Vt equals the deseasonalized data Yt - St for each iteration
bp.Vt output of the breakpoints function for the trend model
ci.Vt output of the breakpoints confint function for the trend model
Wt equals the detrended data Yt - Tt for each iteration
bp.Vt output of the breakpoints function for the seasonal model
ci.Vt output of the breakpoints confint function for the seasonal model
nobp is a list with the following elements:
nobp.Vt logical, TRUE if there are breakpoints detected
nobp.Wt logical, TRUE if there are breakpoints detected
magnitude magnitude of the biggest change detected in the trend component
Time timing of the biggest change detected in the trend component

Author(s)

Jan Verbesselt

References

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.

See Also

plot.bfast for plotting of bfast() results.
breakpoints for more examples and background information about estimation of breakpoints in time series.

Examples

# 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") 


[Package bfast version 1.1 Index]