Learn R Programming

Rbeast (version 0.9.2)

plot.beast: Bayesian changepoint detection and time series decomposition

Description

Plot the result obtained from the beast function.

Usage

# S3 method for beast
plot(
     x, 
     index = 1,
     vars  = c('st','s','scp','sorder','t','tcp','torder','o','ocp','error'),  
     col         = NULL, 
     main        = "BEAST decomposition and changepoint detection",
     xlab        = 'Time',
     ylab        = NULL,
     cex.main    = 1,
     cex.lab     = 1,  
     relative.heights = NULL,           
     interactive =FALSE,
     ...	 
   )

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 plot if x contains results for multiple time series. index is always 1 if x has 1 time series. If x is returned by beast123 with a 2D input,index should be a single integer. If x is from beast123 appied 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 pixel/grid.

vars

a vector of strings indicating the elements or variables of x to plot. Possible vars strings include 'st' (season plus trend), 's' (season component), 't' (trend component), 'o' (outliers), 'scp', 'tcp', 'ocp' (ocurrence probability of seasonal/trend/outlier changepoint), 'sorder' (seasoanl harmonic order), 'torder' (trend polynomial order), 'samp' (amplitude of seasonality), 'tslp' (slope of trend), and 'error' (remainder).

relative.heights

a numeric vector of the same length as that of vars to specify the relative heights of subplots of individual variables in vars.

col

a string vector of the same length as that of vars to specify the colors of individual subplots assocaited with vars.

main

a string; the main title.

xlab

a string: the x axis title.

ylab

a string vector of the same length as that of vars to specify the y axis names of individual subplots assocaited with vars

cex.main

cex for the main title

cex.lab

cex for the axis title

interactive

a bool scaler. If TRUE, an interactive GUI is used for examining individual elements of x.

additional parameters to be implemented.

Value

This function creates various plots to demonstrate the results of a beast decomposition. .

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

Run this code
# NOT RUN {
 library(Rbeast)
 data(simdata)
# }
# NOT RUN {
 result=beast123(simdata, metadata=list(whichDimIsTime=1))
 plot(result,1)
 plot(result,2)
# }

Run the code above in your browser using DataLab