StateSpecification: Add a state component to a Bayesian structural time series...

Description Author(s) References See Also Examples

Description

Add a state component to the state.specification argument in a bsts model.

Author(s)

Steven L. Scott stevescott@google.com

References

Harvey (1990), "Forecasting, structural time series, and the Kalman filter", Cambridge University Press.

Durbin and Koopman (2001), "Time series analysis by state space methods", Oxford University Press.

See Also

bsts. SdPrior NormalPrior Ar1CoefficientPrior

Examples

1
2
3
4
5
6
7
  data(AirPassengers)
  y <- log(AirPassengers)
  ss <- AddLocalLinearTrend(list(), y)
  ss <- AddSeasonal(ss, y, nseasons = 12)
  model <- bsts(y, state.specification = ss, niter = 500)
  pred <- predict(model, horizon = 12, burn = 100)
  plot(pred)

bsts documentation built on May 19, 2017, 7 a.m.

Search within the bsts package
Search all R packages, documentation and source code