Learn R Programming

autostsm (version 1.1)

stsm_init_vals: Get initial values for the Kalman filter

Description

Get initial values for the Kalman filter

Usage

stsm_init_vals(
  y,
  par,
  freq,
  trend,
  decomp = "",
  harmonics = NULL,
  prior = NULL
)

Arguments

y

an object created from stsm_detect_frequency

par

parameter values for the state space model

freq

Frequency of the data

trend

Trend specification ("random-walk", "random-walk-drift", "double-random-walk", "random-walk2").

decomp

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

harmonics

The harmonics to split the seasonality into

prior

A data table created by stsm_prior

Value

list containing the initial values for the Kalman filter