Skip to contents

bsvars: Bayesian Estimation of Structural Vector Autoregressive Models

Browse package information

bsvars-package bsvars
Bayesian Estimation of Structural Vector Autoregressive Models

Data

Upload sample data set

us_fiscal_lsuw
A 3-variable US fiscal system for the period 1948 Q1 -- 2023 Q2
us_fiscal_ex
A 3-variable system of exogenous variables for the US fiscal model for the period 1948 Q1 -- 2023 Q2

Model specification

Choose a model to work with

specify_bsvar
R6 Class representing the specification of the homoskedastic BSVAR model
specify_bsvar_mix
R6 Class representing the specification of the BSVAR model with a zero-mean mixture of normals model for structural shocks.
specify_bsvar_msh
R6 Class representing the specification of the BSVAR model with Markov Switching Heteroskedasticity.
specify_bsvar_sv
R6 Class representing the specification of the BSVAR model with Stochastic Volatility heteroskedasticity.

More detailed model specification

Adjust or inspect the specified model

specify_data_matrices
R6 Class Representing DataMatricesBSVAR
specify_identification_bsvars
R6 Class Representing IdentificationBSVARs
specify_prior_bsvar
R6 Class Representing PriorBSVAR
specify_prior_bsvar_mix
R6 Class Representing PriorBSVARMIX
specify_prior_bsvar_msh
R6 Class Representing PriorBSVARMSH
specify_prior_bsvar_sv
R6 Class Representing PriorBSVARSV
specify_starting_values_bsvar
R6 Class Representing StartingValuesBSVAR
specify_starting_values_bsvar_mix
R6 Class Representing StartingValuesBSVARMIX
specify_starting_values_bsvar_msh
R6 Class Representing StartingValuesBSVARMSH
specify_starting_values_bsvar_sv
R6 Class Representing StartingValuesBSVARSV

Estimation

Run Bayesian estimation of your model and inspect the outputs

estimate(<BSVAR>)
Bayesian estimation of a homoskedastic Structural Vector Autoregression via Gibbs sampler
estimate(<BSVARMIX>)
Bayesian estimation of a Structural Vector Autoregression with shocks following a finite mixture of normal components via Gibbs sampler
estimate(<BSVARMSH>)
Bayesian estimation of a Structural Vector Autoregression with Markov-switching heteroskedasticity via Gibbs sampler
estimate(<BSVARSV>)
Bayesian estimation of a Structural Vector Autoregression with Stochastic Volatility heteroskedasticity via Gibbs sampler
estimate(<PosteriorBSVAR>)
Bayesian estimation of a homoskedastic Structural Vector Autoregression via Gibbs sampler
estimate(<PosteriorBSVARMIX>)
Bayesian estimation of a Structural Vector Autoregression with shocks following a finite mixture of normal components via Gibbs sampler
estimate(<PosteriorBSVARMSH>)
Bayesian estimation of a Structural Vector Autoregression with Markov-switching heteroskedasticity via Gibbs sampler
estimate(<PosteriorBSVARSV>)
Bayesian estimation of a Structural Vector Autoregression with Stochastic Volatility heteroskedasticity via Gibbs sampler
estimate()
Bayesian estimation of Structural Vector Autoregressions via Gibbs sampler
normalise_posterior()
Waggoner & Zha (2003) row signs normalisation of the posterior draws for matrix \(B\)
specify_posterior_bsvar
R6 Class Representing PosteriorBSVAR
specify_posterior_bsvar_mix
R6 Class Representing PosteriorBSVARMIX
specify_posterior_bsvar_msh
R6 Class Representing PosteriorBSVARMSH
specify_posterior_bsvar_sv
R6 Class Representing PosteriorBSVARSV

Forecasting

Predict future values of your variables

forecast(<PosteriorBSVAR>)
Forecasting using Structural Vector Autoregression
forecast(<PosteriorBSVARMIX>)
Forecasting using Structural Vector Autoregression
forecast(<PosteriorBSVARMSH>)
Forecasting using Structural Vector Autoregression
forecast(<PosteriorBSVARSV>)
Forecasting using Structural Vector Autoregression
forecast()
Forecasting using Structural Vector Autoregression

Structural analyses

Compute interpretable outcomes

compute_conditional_sd()
Computes posterior draws of structural shock conditional standard deviations
compute_fitted_values()
Computes posterior draws of dependent variables' fitted values
compute_historical_decompositions()
Computes posterior draws of historical decompositions
compute_impulse_responses()
Computes posterior draws of impulse responses
compute_regime_probabilities()
Computes posterior draws of regime probabilities
compute_structural_shocks()
Computes posterior draws of structural shocks
compute_variance_decompositions()
Computes posterior draws of the forecast error variance decomposition

Model diagnostics

Verify heteroskedasticity and autoregressive parameters (in preparation: structural identification)

verify_autoregression(<PosteriorBSVAR>)
Verifies hypotheses involving autoregressive parameters
verify_autoregression(<PosteriorBSVARMIX>)
Verifies hypotheses involving autoregressive parameters
verify_autoregression(<PosteriorBSVARMSH>)
Verifies hypotheses involving autoregressive parameters
verify_autoregression(<PosteriorBSVARSV>)
Verifies hypotheses involving autoregressive parameters
verify_autoregression()
Verifies hypotheses involving autoregressive parameters
verify_volatility(<PosteriorBSVAR>)
Verifies heteroskedasticity of structural shocks equation by equation
verify_volatility(<PosteriorBSVARMIX>)
Verifies heteroskedasticity of structural shocks equation by equation
verify_volatility(<PosteriorBSVARMSH>)
Verifies heteroskedasticity of structural shocks equation by equation
verify_volatility(<PosteriorBSVARSV>)
Verifies heteroskedasticity of structural shocks equation by equation
verify_volatility()
Verifies heteroskedasticity of structural shocks equation by equation