Bayesian Analyses of Structural Vector Autoregressions with Sign, Zero, and Narrative Restrictions Using the \proglang R Package \pkg bsvarSIGNs (Version 2.0)

Xiaolei Wang University of Melbourne, Tomasz Woźniak University of Melbourne · 2025

Read Bayesian Analyses of Structural Vector Autoregressions with Sign, Zero, and Narrative Restrictions Using the \proglang R Package \pkg bsvarSIGNs (Version 2.0) by Xiaolei Wang University of Melbourne, Tomasz Woźniak University of Melbourne (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2501-16711.txt.

Introduction

Xiaolei Wang and Tomasz Woźniak introduced an updated software package in 2025 for a common task in economics. Economists use vector autoregression models to trace how shocks, like a rate change, ripple through an economy over time. To name the shocks, they add rules about signs, zeros, and known past events, but mixing all three rule types at once was hard.

Their free R package, now in its second major version, handles all three together for the first time. Fast code written partly in a compiled language keeps large jobs quick. Users get forecasts, shock breakdowns, plots, and plain summaries, plus full guides. The package won an Australian software award.

Catalog record

CREATORXiaolei Wang University of Melbourne, Tomasz Woźniak University of Melbourne
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE36 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2501-16711

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Bayesian Analyses of Structural Vector Autoregressions with Sign, Zero, and Narrative Restrictions Using the \proglang R Package \pkg bsvarSIGNs (Version 2.0) Xiaolei Wang University of Melbourne, Tomasz Woźniak University of Melbourne Abstract \Plainauthor Xiaolei Wang, Tomasz Woźniak \Plaintitle Bayesian Analyses of Structural Vector Autoregressions with Sign, Zero, and Narrative Restrictions Using the R Package bsvarSIGNs \Shorttitle \pkg bsvarSIGNs: Bayesian SVARs with Sign, Zero, and Narrative Restrictions \Abstract The \proglang R package \pkg bsvarSIGNs implements state-of-the-art algorithms for the Bayesian analysis of Structural Vector Autoregressions identified by sign, zero, and narrative restrictions. It offers fast and efficient estimation thanks to the deployment of frontier econometric and numerical techniques and algorithms written in \proglang C++. The core model is based on a flexible Vector Autoregression with estimated hyper-parameters of the Minnesota prior and the dummy observation priors. The structural model can be identified by sign, zero, and narrative restrictions, including a novel solution making it possible to use the three types of restrictions 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. The package was granted the Di Cook Open-Source Statistical Software Award by the Statistical Society of Australia in 2024. \Keywords Bayesian inference, Structural VARs, Gibbs sampler, sign restrictions, zero restrictions, narrative restrictions, forecasting, structural analysis, R \Plainkeywords Bayesian inference, Structural VARs, Gibbs sampler, sign restrictions, zero restrictions, narrative restrictions, forecasting, structural analysis, R \Address Xiaolei Wang University of Melbourne Department of Economics 111 Barry Street 3053 Carlton, VIC, Australia E-mail: URL: https://github.com/adamwang15 Tomasz Woźniak University of Melbourne Department of Economics 111 Barry Street 3053 Carlton, VIC, Australia E-mail: URL: https://github.com/donotdespair 1 Introduction Following the seminal developments proposed by Sims (1980) and Doan et al. (1984) Structural Vector Autoregressions (SVARs) have become go-to models for empirical research in macroeconomics and finance. This fact is attributed to the model’s capacity to accommodate basic features of macroeconomic aggregates, relative simplicity of implementation, and interpretability facilitating a wide range of applications ( Kilian and Lütkepohl, 2017 , see, for instance,) . The SVARs are models that treat all the variables and endogenously determined in a structural, stochastic, dynamic system capturing the data serial autocorrelation, as well as their temporal and contemporaneous interdependencies. Additional assumptions of linearity and conditional Gaussianity lead to analytical tractability and parsimonious estimation ( Lütkepohl, 2005 ; Karlsson, 2013 , see, for instance,) . Finally, they can be used to investigate Granger causality, dynamic causal effects of well-isolated shocks, network connections, and forecast future values of the variables of interest. All these features, make them indispensable for decision-making at economic governance and financial institutions. Bayesian approach applied to SVARs facilitates inference in finite samples, which is particularly important due to a relatively small number of observations given the large dimension of the parameter space in many applications. In this context, the prior distribution of parameters of the model that must be specified to apply Bayes’ rule provides an additional tool to handle identification, sparsity, regularisation, and improve the forecasting performance. Additionally, the reliability of numerical methods used for Bayesian estimation has driven the incorporation of a large number of variables, sophisticated identification strategies, and non-linearity in the model specification. All this comes at a cost of computational complexity to be paid for estimation, inference, and forecasting. Following these developments, macroeconometrics as an academic field became increasingly computational and characterised by data-driven application-specific modelling approaches. An important development facilitating Bayesian analysis of Vector Autoregressions (VARs) was the application of a matrix-variate normal inverse Wishart prior distribution for the model parameters, namely the autoregressive parameters matrix and error term covariance matrix, proposed by Drèze and Morales (1976) for the multivariate regression model and adapted to VARs by Kadiyala and Karlsson (1997) . This natural-conjugate prior combined with the assumption of conditional normality of the error term result in a joint posterior distribution of these parameters being matrix-variate normal inverse Wishart ( Woźniak, 2016 , see, e.g.,) . This posterior distribution has a known analytical form, is easy to sample from, and has become the basis for multiple modelling approaches ( Bańbura et al., 2010 ; Koop, 2013 ; Chan, 2020 , see, for instance,) . This paper and the corresponding \proglang R package \pkg bsvarSIGNs by Wang and Woźniak (2024) provides fast and efficient algorithms for Bayesian analysis of SVARs. It takes advantage of this convenient model formulation and applies frontier econometric and numerical techniques and code written in \proglang C++ to ensure blazingly fast computations. Additionally, it offers a great flexibility in choosing the model identification pattern, modifying the prior assumptions, and accessing interpretable tabulated or plotted outputs. Therefore, the package makes it possible to benefit from the best of the two facilities: the convenience of data analysis using \proglang R and the computational speed using code written in \proglang C++. More specifically the \pkg bsvarSIGNs package builds upon a Bayesian VAR model relying on the conditional prior and posterior distribution for the parameter of the model being the normal-inverse Wishart distribution. The models can be further extended by hierarchical prior distribution as in Giannone et al. (2015) featuring the Minnesota and dummy-observation priors by Doan et al. (1984) , explicit specification of a prior distribution for the rotation of the structural system as in Rubio-Ramírez et al. (2010) . These additional model features are introduced through their corresponding marginal prior distributions and they are treated as given in the conditional prior specification of the VAR parameters. This construction of the joint prior and posterior distributions allow the models to benefit from both: the analytical convenience of the natural conjugate prior distribution granting computational efficiency and the flexibility of the structural model specification leading to its empirical relevance. This convenient model construction facilitates the application of a variety of methods for the identification of structural shocks. The \pkg bsvarSIGNs package implements the identification of the SVARs using sign restrictions as in Rubio-Ramírez et al. (2010) , zero and sign restrictions proposed by Arias et al. (2018) , and narrative sign restrictions introduced by Antolín-Díaz and Rubio-Ramírez (2018) . We also prove that all of these restrictions can be used simultaneously and include this novel possibility in the package algorithms. All of these models are set identified up to a rotation matrix such that the sign, zero, and narrative restrictions hold. Appropriate handling of the orthogonal matrix rotating the structural system is essential as this rotation is not updated with the information from the data and is featured in the asymptotic posterior distribution of the model parameters as shown by Baumeister and Hamilton (2015) . Following Rubio-Ramírez et al. (2010) , all the models provided in the \pkg bsvarSIGNs package sample the rotation matrix from the uniform distribution over the space of orthogonal matrices, namely the Haar distribution by Stewart (1980) . Subsequently, this draw, together with the VAR model parameters, is accepted or not based on whether the sign, zero, or narrative restrictions hold. When the zero and narrative restrictions are used, the accepted draws are resampled using importance weights as in Arias et al. (2018)

Read the complete text