bsm: Basic Structural Time Series models

View source: R/stsm.R

bsmR Documentation

Basic Structural Time Series models

Description

bsm creates/estimates basic structural models for seasonal time series.

Usage

bsm(
  y,
  bc = FALSE,
  seas = c("hd", "ht", "hs"),
  s2v = c(lvl = 0.2, slp = 0.05, seas = 0.075),
  s2u = 0.1,
  xreg = NULL,
  fSv = NULL,
  ...
)

Arguments

y

an object of class ts, with frequency 4 or 12.

bc

logical. If TRUE logs are taken.

seas

character, type of seasonality (Harvey-Durbin (hd), Harvey-Todd (ht), Harrison-Steven (ht))

s2v

variances of the error vector v_t.

s2u

variance of the error u_t.

xreg

matrix of regressors.

fSv

function to create the covariance matrix of v_t.

...

other arguments.

Value

An object of class stsm.

References

Durbin, J. and Koopman, S.J. (2012) Time Series Analysis by State Space Methods, 2nd ed., Oxford University Press, Oxford.

Examples


bsm1 <- bsm(AirPassengers, bc = TRUE)


tfarima documentation built on May 20, 2022, 5:06 p.m.