tsextract: Bayesian changepoint detection and time series decomposition

View source: R/tsextract.R

tsextractR Documentation

Bayesian changepoint detection and time series decomposition

Description

Extract the result of a single time series from an object of class beast

Usage

    tsextract( x, index = 1 ) 

Arguments

x

a "beast" object returned by beast, beast.irreg, or beast123. It may contain one or many time series.

index

an integer (default to 1 ) or a vector of two integers to specify the index of the time series to extract if x contains results for multiple time series. If x has 1 time series, index should be always 1. If x is returned by beast123 applied to a 2D input,index should be a single index. If x is from beast123 applied to 3D arrays of time series (e.g., stacked satellite images), index can be a linear index or two subscripts to specify the row and column of the desired pixel/grid.

Value

A LIST object of the result for the chosen time series, which contains the same field as x.

Note

Use this function only to manually and interactively examine individual times series. If the purpose is to loop through x, the use of direct indexing is much faster. For example, if x is a beast object for a 300x200x1000 3D array (row x col x time), use x$trend$Y[20,40,] to get the fitted trend at the pixel of row 20 and col 40.

References

  1. Zhao, K., Wulder, M.A., Hu, T., Bright, R., Wu, Q., Qin, H., Li, Y., Toman, E., Mallick, B., Zhang, X. and Brown, M., 2019. Detecting change-point, trend, and seasonality in satellite time series data to track abrupt changes and nonlinear dynamics: A Bayesian ensemble algorithm. Remote Sensing of Environment, 232, p.111181 (the beast algorithm paper).

  2. Zhao, K., Valle, D., Popescu, S., Zhang, X. and Mallick, B., 2013. Hyperspectral remote sensing of plant biochemistry using Bayesian model averaging with variable and band selection. Remote Sensing of Environment, 132, pp.102-119 (the Bayesian MCMC scheme used in beast).

  3. Hu, T., Toman, E.M., Chen, G., Shao, G., Zhou, Y., Li, Y., Zhao, K. and Feng, Y., 2021. Mapping fine-scale human disturbances in a working landscape with Landsat time series on Google Earth Engine. ISPRS Journal of Photogrammetry and Remote Sensing, 176, pp.250-261(a beast application paper).

See Also

beast, beast.irreg, beast123, minesweeper, tetris, geeLandsat

Examples


 library(Rbeast)
 data(simdata)
 
 
 # handle only the 1st ts
 out=beast(simdata[,1]) 
 
 
 ## Not run: 
 # handle all the ts
 out=beast123(simdata, metadata=list(whichDimIsTime=1))  
 
 plot(out,1)
 plot(out,2)

## End(Not run)

Rbeast documentation built on May 18, 2022, 9:05 a.m.

Related to tsextract in Rbeast...