tcs_ssm: State space model Creates a state space model in list form yt...

Description Usage Arguments Value Author(s) Examples

View source: R/package_functions.R

Description

State space model Creates a state space model in list form yt = Ht * Bt + e_t Bt = Ft * B_t-1 + u_t

Usage

1
2
3
4
5
6
7
8
9
tcs_ssm(
  par = NULL,
  yt = NULL,
  freq = NULL,
  decomp = NULL,
  trend_spec = NULL,
  init = NULL,
  model = NULL
)

Arguments

par

Vector of named parameter values, includes the harmonics

yt

Univariate time series of data values

freq

Frequency of the data (1 (yearly), 4 (quarterly), 12 (montly), 52 (weekly), 365 (daily))

decomp

Decomposition model ("tend-cycle-seasonal", "trend-seasonal", "trend-cycle", "trend-noise")

trend_spec

Trend specification (NULL, "rw", "rwd", "2rw"). The default is NULL which will choose the best of all specifications based on the maximum likielhood. "rw" is the random walk trend. "rwd" is the random walk with random walk drift trend. "2rw" is a 2nd order random walk trend.

init

Initial state values for the Kalman filter

model

a tcs_decomp_estim model object

Value

List of space space matrices

Author(s)

Alex Hubbard (hubbard.alex@gmail.com)

Examples

1
tcs_ssm(par, y, freq, decomp, trend_spec, init)

opendoor-labs/TCSDecomp documentation built on April 21, 2020, 3:15 a.m.