plot_comp: Plot Posterior State Components

plot_compR Documentation

Plot Posterior State Components

Description

Plots of the mean of posterior state components of each target series, which is generated by the model training procedure of the MBSTS model.

Usage

plot_comp(
  object,
  slope,
  local,
  season,
  cyc,
  time = NULL,
  title = NULL,
  component_selection = "All"
)

## S4 method for signature 'mbsts'
plot_comp(
  object,
  slope,
  local,
  season,
  cyc,
  time = NULL,
  title = NULL,
  component_selection = "All"
)

Arguments

object

An object of the mbsts class created by a call to the mbsts_function function.

slope

A logical vector indicating whether there is trend for each target series, such as c(T,T).

local

A logical vector indicating whether there is local level for each target series, such as c(T,T).

season

A numerical vector indicating the seasonality for each target series, such as c(12,0).

cyc

A logical vector indicating whether there is a cycle component for each target series, such as c(F,T).

time

Null or a data frame for time index of the time series. The default value is data.frame(seq(1,n)).

title

NULL or a character vector whose entries are titles for the plots of target series' posterior state components, such as c("Posterior State Components of y1", "Posterior State Components of y2"). The default is c("y1","y2",...).

component_selection

A character variable whose value must be one of "All", "Trend", "Seasonal", "Cycle", and "Regression". Here, "Trend" means the trend component only and "All" means all the components.

Author(s)

Jinwen Qiu qjwsnow_ctw@hotmail.com Ning Ning patricianing@gmail.com

References

\Qiu

2018

\Ning

2021

\Jammalamadaka

2019


mbsts documentation built on Jan. 7, 2023, 9:07 a.m.