https://github.com/lampspuc/statespacemodels.jl

StateSpaceModels.jl is a Julia package for time-series analysis using state-space models.

https://github.com/lampspuc/statespacemodels.jl

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.6%) to scientific vocabulary

Keywords

econometrics exponential-smoothing forecasting julia-language kalman-filter sarima state-space-models statistics time-series time-series-analysis unobserved-components

Keywords from Contributors

conic-programs convex-optimization semidefinite-programming mcmc sciml neural-ode differential-equations mathematical-programming bayesian-inference bayesian-neural-networks
Last synced: 5 months ago · JSON representation

Repository

StateSpaceModels.jl is a Julia package for time-series analysis using state-space models.

Basic Info
Statistics
  • Stars: 277
  • Watchers: 10
  • Forks: 28
  • Open Issues: 16
  • Releases: 44
Topics
econometrics exponential-smoothing forecasting julia-language kalman-filter sarima state-space-models statistics time-series time-series-analysis unobserved-components
Created about 8 years ago · Last pushed 11 months ago
Metadata Files
Readme License

README.md

StateSpaceModels.jl

| Build Status | Coverage | Documentation | |:-----------------:|:-----------------:|:-----------------:| | Build Status | Codecov branch |

StateSpaceModels.jl is a package for modeling, forecasting, and simulating time series in a state-space framework. Implementations were made based on the book "Time Series Analysis by State Space Methods" (2012) by James Durbin and Siem Jan Koopman. The notation of the variables in the code also follows the book.

Quickstart

```julia import Pkg

Pkg.add("StateSpaceModels")

using StateSpaceModels

y = randn(100)

model = LocalLevel(y)

fit!(model)

print_results(model)

forecast(model, 10)

kf = kalman_filter(model)

v = get_innovations(kf)

ks = kalman_smoother(model)

alpha = getsmoothedstate(ks) ```

Features

Current features include: * Kalman filter and smoother * Maximum likelihood estimation * Forecasting and Monte Carlo simulation * User-defined models (user specifies the state-space system) * Several predefined models, including: * Exponential Smoothing (ETS, all the linear ones) * Unobserved components (local level, basic structural, ...) * SARIMA * Linear regression * Naive models * Completion of missing values * Diagnostics for the residuals of fitted models * Visualization recipes

Quick Examples

Fitting and forecasting

Quick example of different models fit and forecast for the air passengers time-series

```julia using CSV using DataFrames using Plots using StateSpaceModels

airp = CSV.File(StateSpaceModels.AIRPASSENGERS) |> DataFrame logairpassengers = log.(airp.passengers) stepsahead = 30

SARIMA

modelsarima = SARIMA(logairpassengers; order = (0, 1, 1), seasonalorder = (0, 1, 1, 12)) fit!(modelsarima) forecsarima = forecast(modelsarima, stepsahead)

Unobserved Components

modeluc = UnobservedComponents(logairpassengers; trend = "local linear trend", seasonal = "stochastic 12") fit!(modeluc) forecuc = forecast(modeluc, steps_ahead)

Exponential Smoothing

modelets = ExponentialSmoothing(logairpassengers; trend = true, seasonal = 12) fit!(modelets) forecets = forecast(modelets, steps_ahead)

Naive model

modelnaive = SeasonalNaive(logairpassengers, 12) fit!(modelnaive) forecnaive = forecast(modelnaive, steps_ahead)

pltsarima = plot(modelsarima, forecsarima; title = "SARIMA", label = ""); pltuc = plot(modeluc, forecuc; title = "Unobserved components", label = ""); pltets = plot(modelets, forecets; title = "Exponential smoothing", label = ""); pltnaive = plot(modelets, forecnaive; title = "Seasonal Naive", label = "");

plot(pltsarima, pltuc, pltets, pltnaive; layout = (2, 2), size = (500, 500)) ``` quick_example_airp

Automatic forecasting

Quick examples on automatic forecasting. When performing automatic forecasting users should provide the seasonal period if there is one. julia model = auto_ets(log_air_passengers; seasonal = 12) model = auto_arima(log_air_passengers; seasonal = 12)

Contributing

  • PRs such as adding new models and fixing bugs are very welcome!
  • For nontrivial changes, you'll probably want to first discuss the changes via issue.

Citing StateSpaceModels.jl

If you use StateSpaceModels.jl in your work, we kindly ask you to cite the following paper:

@article{SaavedraBodinSouto2019,
  title={StateSpaceModels.jl: a Julia Package for Time-Series Analysis in a State-Space Framework},
  author={Raphael Saavedra and Guilherme Bodin and Mario Souto},
  journal={arXiv preprint arXiv:1908.01757},
  year={2019}
}

Owner

  • Name: Laboratory of Applied Mathematical Programming and Statistics
  • Login: LAMPSPUC
  • Kind: organization

Laboratory for research and development on mathematical programming (optimization) and statistics. Electrical and Industrial Engineering departments, PUC-Rio.

GitHub Events

Total
  • Create event: 2
  • Commit comment event: 4
  • Release event: 1
  • Issues event: 2
  • Watch event: 12
  • Delete event: 1
  • Issue comment event: 6
  • Push event: 13
  • Pull request event: 2
  • Fork event: 3
Last Year
  • Create event: 2
  • Commit comment event: 4
  • Release event: 1
  • Issues event: 2
  • Watch event: 12
  • Delete event: 1
  • Issue comment event: 6
  • Push event: 13
  • Pull request event: 2
  • Fork event: 3

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 456
  • Total Committers: 14
  • Avg Commits per committer: 32.571
  • Development Distribution Score (DDS): 0.511
Past Year
  • Commits: 7
  • Committers: 2
  • Avg Commits per committer: 3.5
  • Development Distribution Score (DDS): 0.286
Top Committers
Name Email Commits
guilhermebodin g****s@g****m 223
rsaavedra r****3@g****m 156
Raphael Saavedra r****a@e****r 31
Iago Sichinel Chavarry i****0@g****m 21
Mario Souto m****o@g****m 14
azev77 a****7 2
andre_ramos a****7 2
psrcloud p****d@p****m 1
Patrick Kofod Mogensen p****n@g****m 1
Marina Dietze 8****a 1
Marina Dietze 3****e 1
Júlio Hoffimann j****n@g****m 1
Julia TagBot 5****t 1
Brian Groenke b****8@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 53
  • Total pull requests: 66
  • Average time to close issues: 4 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 20
  • Total pull request authors: 10
  • Average comments per issue: 2.62
  • Average comments per pull request: 1.32
  • Merged pull requests: 58
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 5
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 day
  • Issue authors: 2
  • Pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 1.8
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • guilhermebodin (23)
  • SupplyChef (4)
  • waynelapierre (4)
  • mapi1 (3)
  • raphaelsaavedra (2)
  • iagochavarry (2)
  • dompazz (2)
  • juliohm (1)
  • rschwarz (1)
  • davibarreira (1)
  • JuliaTagBot (1)
  • FelixNoessler (1)
  • dazhwu (1)
  • jsimons8 (1)
  • eoteroe (1)
Pull Request Authors
  • guilhermebodin (52)
  • iagochavarry (5)
  • andreramosfdc (4)
  • raphaelsaavedra (3)
  • AnaChikashua (2)
  • bgroenks96 (1)
  • dietzemarina (1)
  • azev77 (1)
  • PaulMainwood (1)
  • pkofod (1)
Top Labels
Issue Labels
bug (3) good first issue (2) enhancement (1) docs (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • julia 85 total
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 40
juliahub.com: StateSpaceModels

StateSpaceModels.jl is a Julia package for time-series analysis using state-space models.

  • Versions: 40
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 85 Total
Rankings
Stargazers count: 3.3%
Forks count: 6.8%
Dependent repos count: 9.9%
Average: 14.8%
Dependent packages count: 38.9%
Last synced: 6 months ago

Dependencies

.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite
.github/workflows/ci.yml actions
  • actions/cache v1 composite
  • actions/checkout v2 composite
  • codecov/codecov-action v1 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-processcoverage v1 composite
  • julia-actions/julia-runtest v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/doc_cleanup.yml actions
  • actions/checkout v2 composite
.github/workflows/documentation.yml actions
  • actions/checkout v2 composite
  • julia-actions/setup-julia latest composite