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"),
  par = c(irr = 0.75, lvl = 1, slp = 0.05, seas = 0.075),
  fixed = c(lvl = TRUE),
  xreg = NULL,
  fit = TRUE,
  updmdl = 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))

par

real vector with the error variances of each unobserved component.

fixed

logical vector to fix parameters.

xreg

matrix of regressors.

fit

logical. If TRUE, model is fitted.

updmdl

function to update the parameters of the BSM.

...

additional 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)


gallegoj/tfarima documentation built on March 31, 2024, 10:32 a.m.