Package: bssm 2.0.2

bssm: Bayesian Inference of Non-Linear and Non-Gaussian State Space Models

Efficient methods for Bayesian inference of state space models via Markov chain Monte Carlo (MCMC) based on parallel importance sampling type weighted estimators (Vihola, Helske, and Franks, 2020, <doi:10.1111/sjos.12492>), particle MCMC, and its delayed acceptance version. Gaussian, Poisson, binomial, negative binomial, and Gamma observation densities and basic stochastic volatility models with linear-Gaussian state dynamics, as well as general non-linear Gaussian models and discretised diffusion models are supported. See Helske and Vihola (2021, <doi:10.32614/RJ-2021-103>) for details.

Authors:Jouni Helske [aut, cre], Matti Vihola [aut]

bssm_2.0.2.tar.gz
bssm_2.0.2.zip(r-4.5)bssm_2.0.2.zip(r-4.4)bssm_2.0.2.zip(r-4.3)
bssm_2.0.2.tgz(r-4.4-x86_64)bssm_2.0.2.tgz(r-4.4-arm64)bssm_2.0.2.tgz(r-4.3-x86_64)bssm_2.0.2.tgz(r-4.3-arm64)
bssm_2.0.2.tar.gz(r-4.5-noble)bssm_2.0.2.tar.gz(r-4.4-noble)
bssm_2.0.2.tgz(r-4.4-emscripten)bssm_2.0.2.tgz(r-4.3-emscripten)
bssm.pdf |bssm.html
bssm/json (API)
NEWS

# Install 'bssm' in R:
install.packages('bssm', repos = c('https://helske.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/helske/bssm/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
Datasets:

On CRAN:

bayesian-inferencecppmarkov-chain-monte-carloparticle-filterstate-spacetime-series

6.43 score 40 stars 11 scripts 1.5k downloads 46 exports 55 dependencies

Last updated 2 months agofrom:813a94ba0a. Checks:OK: 9. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 07 2024
R-4.5-win-x86_64OKNov 07 2024
R-4.5-linux-x86_64OKNov 07 2024
R-4.4-win-x86_64OKNov 07 2024
R-4.4-mac-x86_64OKNov 07 2024
R-4.4-mac-aarch64OKNov 07 2024
R-4.3-win-x86_64OKNov 07 2024
R-4.3-mac-x86_64OKNov 07 2024
R-4.3-mac-aarch64OKNov 07 2024

Exports:ar1_lgar1_ngas_bssmas_drawsas_draws_dfasymptotic_varbootstrap_filterbsm_lgbsm_ngcheck_diagnosticscpp_example_modelekfekf_fast_smootherekf_smootherekpf_filterestimate_essexpand_samplefast_smoothergammagamma_priorgaussian_approxhalfnormalhalfnormal_prioriactimportance_samplekfilternormalnormal_priorparticle_smootherpost_correctrun_mcmcsim_smoothersmootherssm_mlgssm_mngssm_nlgssm_sdessm_ulgssm_ungsuggest_Nsvmtnormaltnormal_priorukfuniformuniform_prior

Dependencies:abindbackportsbayesplotcheckmateclicodacolorspacecpp11diagisdistributionaldplyrfansifarvergenericsggplot2ggridgesgluegridExtragtableisobandlabelinglatticelifecyclemagrittrMASSMatrixmatrixStatsmgcvmunsellnlmenumDerivpillarpkgconfigplyrposteriorpurrrR6ramcmcRColorBrewerRcppRcppArmadilloreshape2rlangscalessitmostringistringrtensorAtibbletidyrtidyselectutf8vctrsviridisLitewithr

$\psi$-APF for non-linear Gaussian state space models

Rendered frompsi_pf.Rmdusingknitr::rmarkdownon Nov 07 2024.

Last update: 2023-10-25
Started: 2020-06-08

bssm: Bayesian Inference of Non-linear and Non-Gaussian State Space Models in R

Rendered frombssm.Rmdusingknitr::rmarkdownon Nov 07 2024.

Last update: 2023-10-25
Started: 2016-06-07

Diffusion models with bssm

Rendered fromsde_model.Rmdusingknitr::rmarkdownon Nov 07 2024.

Last update: 2023-10-25
Started: 2021-02-19

Non-linear models with bssm

Rendered fromgrowth_model.Rmdusingknitr::rmarkdownon Nov 07 2024.

Last update: 2023-10-25
Started: 2017-02-20

Readme and manuals

Help Manual

Help pageTopics
Univariate Gaussian model with AR(1) latent processar1_lg
Non-Gaussian model with AR(1) latent processar1_ng
Convert KFAS Model to bssm Modelas_bssm
Convert 'run_mcmc' Output to 'draws_df' Formatas_draws as_draws.mcmc_output as_draws_df as_draws_df.mcmc_output
Convert MCMC Output to data.frameas.data.frame.mcmc_output
Asymptotic Variance of IS-type Estimatorsasymptotic_var
Bootstrap Filteringbootstrap_filter bootstrap_filter.lineargaussian bootstrap_filter.nongaussian bootstrap_filter.ssm_nlg bootstrap_filter.ssm_sde
Basic Structural (Time Series) Modelbsm_lg
Non-Gaussian Basic Structural (Time Series) Modelbsm_ng
Bayesian Inference of State Space Modelsbssm-package bssm
Quick Diagnostics Checks for 'run_mcmc' Outputcheck_diagnostics
Example C++ Codes for Non-Linear and SDE Modelscpp_example_model
Deaths by drowning in Finland in 1969-2019drownings
(Iterated) Extended Kalman Filteringekf
Extended Kalman Smoothingekf_fast_smoother ekf_smoother
Extended Kalman Particle Filteringekpf_filter ekpf_filter.ssm_nlg
Effective Sample Size for IS-type Estimatorsestimate_ess
Pound/Dollar daily exchange ratesexchange
Expand the Jump Chain representationexpand_sample
Kalman Smoothingfast_smoother fast_smoother.lineargaussian smoother smoother.lineargaussian
Fitted for State Space Modelfitted.mcmc_output
Gaussian Approximation of Non-Gaussian/Non-linear State Space Modelgaussian_approx gaussian_approx.nongaussian gaussian_approx.ssm_nlg
Integrated Autocorrelation Timeiact
Importance Sampling from non-Gaussian State Space Modelimportance_sample importance_sample.nongaussian
Kalman Filteringkfilter kfilter.lineargaussian kfilter.nongaussian
Extract Log-likelihood of a State Space Model of class 'bssm_model'logLik.lineargaussian logLik.nongaussian logLik.ssm_nlg logLik.ssm_sde
Estimated Negative Binomial Model of Helske and Vihola (2021)negbin_model
Simulated Negative Binomial Time Series Datanegbin_series
Particle Smoothingparticle_smoother particle_smoother.lineargaussian particle_smoother.nongaussian particle_smoother.ssm_nlg particle_smoother.ssm_sde
Trace and Density Plots for 'mcmc_output'plot.mcmc_output
Simulated Poisson Time Series Datapoisson_series
Run Post-correction for Approximate MCMC using psi-APFpost_correct
Predictions for State Space Modelspredict predict.mcmc_output
Print Results from MCMC Runprint.mcmc_output
Bayesian Inference of State Space Modelsrun_mcmc run_mcmc.lineargaussian run_mcmc.nongaussian run_mcmc.ssm_nlg run_mcmc.ssm_sde
Simulation Smoothingsim_smoother sim_smoother.lineargaussian sim_smoother.nongaussian
General multivariate linear Gaussian state space modelsssm_mlg
General Non-Gaussian State Space Modelssm_mng
General multivariate nonlinear Gaussian state space modelsssm_nlg
Univariate state space model with continuous SDE dynamicsssm_sde
General univariate linear-Gaussian state space modelsssm_ulg
General univariate non-Gaussian state space modelssm_ung
Suggest Number of Particles for psi-APF Post-correctionsuggest_N
Summary Statistics of Posterior Samplessummary.mcmc_output
Stochastic Volatility Modelsvm
Unscented Kalman Filteringukf
Prior objects for bssm modelsbssm_prior bssm_prior_list gamma gamma_prior halfnormal halfnormal_prior normal normal_prior tnormal tnormal_prior uniform uniform_prior