bsvars: Bayesian Estimation of Structural Vector Autoregressive Models

Provides fast and efficient procedures for Bayesian analysis of Structural Vector Autoregressions. This package estimates a wide range of models, including homo-, heteroskedastic, and non-normal specifications. Structural models can be identified by adjustable exclusion restrictions, time-varying volatility, or non-normality, and include exclusion restrictions on autoregressive parameters. They all include a flexible three-level equation-specific local-global hierarchical prior distribution for the estimated level of shrinkage for autoregressive and structural parameters. Additionally, the package facilitates predictive and structural analyses such as impulse responses, forecast error variance and historical decompositions, forecasting, verification of heteroskedasticity, non-normality, and hypotheses on autoregressive parameters, as well as analyses of structural shocks, volatilities, and fitted values. Beautiful plots, informative summary functions, and extensive documentation including the vignette by Woźniak (2025) <doi:10.48550/arXiv.2410.15090> complement all this. The implemented techniques align closely with those presented in Lütkepohl, Shang, Uzeda, & Woźniak (2025) <doi:10.1016/j.jeconom.2025.106107>, Lütkepohl & Woźniak (2020) <doi:10.1016/j.jedc.2020.103862>, and Song & Woźniak (2021) <doi:10.1093/acrefore/9780190625979.013.174> and they embed many popular models proposed by other authors. The 'bsvars' package is aligned regarding objects, workflows, and code structure with the R packages 'bsvarSIGNs' by Wang & Woźniak (2025) <doi:10.32614/CRAN.package.bsvarSIGNs>, 'bvars' by Liu, Ramirez Hassan, Woźniak (2026) <doi:10.32614/CRAN.package.bvars>, and 'bpvars' by Woźniak (2026) <doi:10.32614/CRAN.package.bpvars>, and they constitute an integrated toolset.

Version: 4.0
Depends: R (≥ 4.1.0)
Imports: Rcpp (≥ 1.0.7), RcppProgress (≥ 0.1), RcppTN, GIGrvg, R6, stochvol, generics
LinkingTo: Rcpp, RcppProgress, RcppArmadillo, RcppTN
Suggests: knitr, tinytest
Published: 2026-08-22
DOI: 10.32614/CRAN.package.bsvars
Author: Tomasz Woźniak ORCID iD ROR ID [aut, cre], Fei Shang ORCID iD [ctb] (co-authored the Journal of Econometrics methodological paper by Lütkepohl, Shang, Uzeda, Woźniak (2026), introduced major code corrections and improvements), Helmut Lütkepohl [ctb] (co-authored the Journal of Econometrics methodological paper by Lütkepohl, Shang, Uzeda, Woźniak (2026)), Luis Uzeda ORCID iD [ctb] (co-authored the Journal of Econometrics methodological paper by Lütkepohl, Shang, Uzeda, Woźniak (2026)), Xiaolei Wang ORCID iD [ctb] (corrected C++ code for historical decompositions), Bruno Cavalcante ORCID iD [ctb] (corrected R code for HMSH forecasting)
Maintainer: Tomasz Woźniak <wozniak.tom at pm.me>
BugReports: https://github.com/bsvars/bsvars/issues
License: GPL (≥ 3)
URL: https://bsvars.org/bsvars/
NeedsCompilation: yes
Citation: bsvars citation info
Materials: README, NEWS
In views: Bayesian, TimeSeries
CRAN checks: bsvars results

Documentation:

Reference manual: bsvars.html , bsvars.pdf
Vignettes: Fast and Efficient Bayesian Analysis of Structural Vector Autoregressions Using the R package bsvars (source)

Downloads:

Package source: bsvars_4.0.tar.gz
Windows binaries: r-devel: bsvars_3.2.zip, r-release: bsvars_4.0.zip, r-oldrel: bsvars_3.2.zip
macOS binaries: r-release (arm64): bsvars_4.0.tgz, r-oldrel (arm64): bsvars_4.0.tgz, r-release (x86_64): bsvars_4.0.tgz, r-oldrel (x86_64): bsvars_4.0.tgz
Old sources: bsvars archive

Reverse dependencies:

Reverse depends: bpvars, bsvarSIGNs, bvars
Reverse linking to: bpvars, bsvarSIGNs, bvars
Reverse suggests: APRScenario

Linking:

Please use the canonical form https://CRAN.R-project.org/package=bsvars to link to this page.