Skip to content

bsvarSIGNs

2.0

Bayesian SVARs with Sign, Zero, and Narrative Restrictions

2packages depend
5.4Kdownloads / year
62.3%test coverage
13/13checks pass

Overview

About
Maintained by Xiaolei WangFirst published 2024-07-233 releasesCRAN page ↗GitHub ↗

Implements state-of-the-art algorithms for the Bayesian analysis of Structural Vector Autoregressions (SVARs) identified by sign, zero, and narrative restrictions. The core model is based on a flexible Vector Autoregression with estimated hyper-parameters of the Minnesota prior and the dummy observation priors as in Giannone, Lenza, Primiceri (2015) doi:10.1162/REST_a_00483. The sign restrictions are implemented employing the methods proposed by Rubio-Ramírez, Waggoner & Zha (2010) doi:10.1111/j.1467-937X.2009.00578.x, while identification through sign and zero restrictions follows the approach developed by Arias, Rubio-Ramírez, & Waggoner (2018) doi:10.3982/ECTA14468. Furthermore, our tool provides algorithms for identification via sign and narrative restrictions, in line with the methods introduced by Antolín-Díaz and Rubio-Ramírez (2018) doi:10.1257/aer.20161852. Users can also estimate a model with sign, zero, and narrative restrictions imposed at once. The package facilitates predictive and structural analyses using impulse responses, forecast error variance and historical decompositions, forecasting and conditional forecasting, as well as analyses of structural shocks and fitted values. All this is complemented by colourful plots, user-friendly summary functions, and comprehensive documentation including the vignette by Wang & Woźniak (2024) doi:10.48550/arXiv.2501.16711. The 'bsvarSIGNs' package is aligned regarding objects, workflows, and code structure with the R package 'bsvars' by Woźniak (2024) doi:10.32614/CRAN.package.bsvars, and they constitute an integrated toolset. It was granted the Di Cook Open-Source Statistical Software Award by the Statistical Society of Australia in 2024.

Install

Health

CRAN checks
13OK
Slowest check: 4.9 min · r-oldrel-windows-x86_64
Code health
Yes
Tests · ratio 0.00
62.3%
Coverage · measured lines
100%
Documentation · exports
5
Dependencies · direct
Check history
  • OK2026-05-02
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-04-22
    12 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-04-18
    11 OK · 2 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • NOTE2026-04-10
    9 OK · 5 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-04-09
    8 OK · 5 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
Show 1 earlier snapshots
  • NOTE2026-03-10
    12 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMEYes · 1,057 wordsVignettesYes · dynamicpkgdown siteNoNEWSYes · 67% structuredCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
100%
Return-value docs
20%
References docs
44%

Downloads

5.4K
CRAN downloads in the past year
Rank #7,502 · ~15/day · ~449/mo
Daily download trend is not available in this view yet.
49730 days
1.4K90 days
5.4K1 year
Compare downloads with other packages →
Also on501 r2u52 autocran

Repository

Repository
30Stars
4Forks
15Open issues
0Open PRs
3Releases
378Commits
2Contributors
econometricsrstatsbayesian-inferencevector-autoregressionrstats-package
378 commits · Last activity 2026-07-19 · 0% stars, 30d

Stars over time

2025-06-30 · 212026-07-07 · 30

Repository practices

Upstream repositoryBeta

3 development-tooling and community-health practices detected across 3 families in the upstream repository

Checks run against github.com/bsvars/bsvarsigns on 2026-07-19.

Continuous integration (1)
GitHub Actions
CRAN release process (1)
cran-comments.md
Docs source (1)
README.Rmd
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
11 external dependencies (excludes base and recommended)
Depends (3)
Suggests (2)
Enhances (0)
none
Reverse dependencies
2direct
0indirect

Code & Tests

Code Composition
C++ 2,439 (39%)R 1,922 (31%)Rd 1,643 (26%)C 253 (4%)Vignettes 10 (0%)
Code characteristics
Object systems
S38R64
Cyclomatic complexity
1.0 median / 12 max
Test cases
47 / 0.00 per code line

Test coverage

Line coverage

62%

Expression

62.3%

Tests / Examples

62.3% / 86% ex

Functions

130 1 exported

Complexity

2.2 avg / 12 max

Call network

130 nodes / 67 edges

Loading call graph…

Lowest coverage

130 functions
FunctionCycloCoverage
specify_narrative exp120%
compute_conditional_sd.PosteriorBSVARSIGN10%
verify_traditional450%
verify_all755%
forecast.PosteriorBSVARSIGN362%
estimate.BSVARSIGN376%

People & History

People (2)
Maintainer (1)
Author, Maintainer
Authors (2)
Author, Maintainer
Package Timeline

3 releases. Pick two to compare their code metrics. R releases are shown for context.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • 2.0Latest
    2025-01-30 · current release · diff ↗
  • 1.0.1
    2024-08-17 · diff ↗
  • 1.0
    2024-07-23
  • R
    R 4.4.0 released · 2024-04-24

Package metadata

First published
2024-07-23
Total releases
3 / 2 yrs
License
GPL (>= 3) OSI
Minimum R
≥ 4.1.0
Bundled data
29 KB / 2 files
Download size
1.2 MB
Installed size
not tracked yet
With dependencies
not tracked yet
Report a problem with this page →