• Stars
    star
    138
  • Rank 255,315 (Top 6 %)
  • Language
    R
  • License
    MIT License
  • Created over 9 years ago
  • Updated almost 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Stan models for state space time series

Reproducing "An Introduction to State Space Time Series Analysis" using Stan

Trying to reproduce the examples introduced in "An Introduction to State Space Time Series Analysis" using Stan.

Example data:

From http://www.ssfpack.com/CKbook.html:
  • logUKpetrolprice.txt
  • NorwayFinland.txt
  • UKdriversKSI.txt
  • UKinflation.txt
  • UKfrontrearseatKSI.txt

Models:

  1. Introduction
    • fig01_01.R: Linear regression
  2. The local level model
    • fig02_01.R: Deterministic level
    • fig02_03.R: Stochastic level
    • fig02_05.R: The local level model and Norwegian fatalities
  3. The local linear trend model
    • fig03_01.R: Stochastic level and slope
    • fig03_04.R: Stochastic level and deterministic slope
    • fig03_05.R: The local linear trend model and Finnish fatalities
  4. The local level model with seasonal
    • fig04_02.R: Deterministic level and seasonal
    • fig04_06.R: Stochastic level and seasonal
    • fig04_10.R: The local level and seasonal model and UK inflation
  5. The local level model with explanatory variable
    • fig05_01.R: Deterministic level and explanatory variable
    • fig05_04.R: Stochastic level and explanatory variable
  6. The local level model with intervention variable
    • fig06_01.R: Deterministic level and intervention variable
    • fig06_04.R: Stochastic level and intervention variable
  7. The UK seat belt and inflation models
    • fig07_01.R: Deterministic level and seasonal
    • fig07_02.R: Stochastic level and seasonal
    • fig07_04.R: The UK inflation model
  8. General treatment of univariate state space models
  9. Multivariate time series analysis
  10. State space and Box–Jenkins methods for time series analysis

IMPORTANT Some models output different results from textbook and R's {dlm} package.

Japanese

Stan で "状態空間時系列分析入門" を再現する

サンプルデータ:

http://www.ssfpack.com/CKbook.html から:
  • logUKpetrolprice.txt
  • NorwayFinland.txt
  • UKdriversKSI.txt
  • UKinflation.txt
  • UKfrontrearseatKSI.txt

モデル:

  1. はじめに
  2. ローカル・レベル・モデル
  3. ローカル線形トレンド・モデル
  4. 季節要素のあるローカル・レベル・モデル
  5. 説明変数のあるローカル・レベル・モデル
  6. 干渉変数のあるローカル・レベル・モデル
  7. 英国シートベルト法とインフレーション・モデル
  8. 単変量状態空間モデルの一般的な取り扱い
  9. 多変量時系列分析
  10. 時系列分析に対する状態空間法とボックス・ジェンキンス法

重要 いくつかのモデルはテキスト、ならびに Rの {dlm} パッケージとは異なる値となっている