Package: bsvars 3.0.1

Tomasz Woźniak

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. 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 complement all this. The implemented techniques align closely with those presented in Lütkepohl, Shang, Uzeda, & Woźniak (2024) <doi:10.48550/arXiv.2404.11057>, Lütkepohl & Woźniak (2020) <doi:10.1016/j.jedc.2020.103862>, and Song & Woźniak (2021) <doi:10.1093/acrefore/9780190625979.013.174>.

Authors:Tomasz Woźniak [aut, cre]

bsvars_3.0.1.tar.gz
bsvars_3.0.1.tar.gz(r-4.5-noble)bsvars_3.0.1.tar.gz(r-4.4-noble)
bsvars_3.0.1.tgz(r-4.4-emscripten)bsvars_3.0.1.tgz(r-4.3-emscripten)
bsvars.pdf |bsvars.html
bsvars/json (API)
NEWS

# Installbsvars in R:
install.packages('bsvars',repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/bsvars/bsvars/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
Datasets:
  • us_fiscal_ex - A 3-variable system of exogenous variables for the US fiscal model for the period 1948 Q1 - 2024 Q1
  • us_fiscal_lsuw - A 3-variable US fiscal system for the period 1948 Q1 - 2024 Q1

31 exports 1 stars 0.61 score 9 dependencies 537 downloads

Last updated 7 days agofrom:54f65d37d9

Exports:compute_conditional_sdcompute_fitted_valuescompute_historical_decompositionscompute_impulse_responsescompute_regime_probabilitiescompute_structural_shockscompute_variance_decompositionsestimateforecastnormalise_posteriorplot_ribbonspecify_bsvarspecify_bsvar_mixspecify_bsvar_mshspecify_bsvar_svspecify_data_matricesspecify_identification_bsvarsspecify_posterior_bsvarspecify_posterior_bsvar_mixspecify_posterior_bsvar_mshspecify_posterior_bsvar_svspecify_prior_bsvarspecify_prior_bsvar_mixspecify_prior_bsvar_mshspecify_prior_bsvar_svspecify_starting_values_bsvarspecify_starting_values_bsvar_mixspecify_starting_values_bsvar_mshspecify_starting_values_bsvar_svverify_autoregressionverify_volatility

Dependencies:codaGIGrvglatticeR6RcppRcppArmadilloRcppProgressRcppTNstochvol

Readme and manuals

Help Manual

Help pageTopics
Bayesian Estimation of Structural Vector Autoregressive Modelsbsvars-package bsvars
Computes posterior draws of structural shock conditional standard deviationscompute_conditional_sd
Computes posterior draws of structural shock conditional standard deviationscompute_conditional_sd.PosteriorBSVAR
Computes posterior draws of structural shock conditional standard deviationscompute_conditional_sd.PosteriorBSVARMIX
Computes posterior draws of structural shock conditional standard deviationscompute_conditional_sd.PosteriorBSVARMSH
Computes posterior draws of structural shock conditional standard deviationscompute_conditional_sd.PosteriorBSVARSV
Computes posterior draws from data predictive densitycompute_fitted_values
Computes posterior draws from data predictive densitycompute_fitted_values.PosteriorBSVAR
Computes posterior draws from data predictive densitycompute_fitted_values.PosteriorBSVARMIX
Computes posterior draws from data predictive densitycompute_fitted_values.PosteriorBSVARMSH
Computes posterior draws from data predictive densitycompute_fitted_values.PosteriorBSVARSV
Computes posterior draws of historical decompositionscompute_historical_decompositions
Computes posterior draws of historical decompositionscompute_historical_decompositions.PosteriorBSVAR
Computes posterior draws of historical decompositionscompute_historical_decompositions.PosteriorBSVARMIX
Computes posterior draws of historical decompositionscompute_historical_decompositions.PosteriorBSVARMSH
Computes posterior draws of historical decompositionscompute_historical_decompositions.PosteriorBSVARSV
Computes posterior draws of impulse responsescompute_impulse_responses
Computes posterior draws of impulse responsescompute_impulse_responses.PosteriorBSVAR
Computes posterior draws of impulse responsescompute_impulse_responses.PosteriorBSVARMIX
Computes posterior draws of impulse responsescompute_impulse_responses.PosteriorBSVARMSH
Computes posterior draws of impulse responsescompute_impulse_responses.PosteriorBSVARSV
Computes posterior draws of regime probabilitiescompute_regime_probabilities
Computes posterior draws of regime probabilitiescompute_regime_probabilities.PosteriorBSVARMIX
Computes posterior draws of regime probabilitiescompute_regime_probabilities.PosteriorBSVARMSH
Computes posterior draws of structural shockscompute_structural_shocks
Computes posterior draws of structural shockscompute_structural_shocks.PosteriorBSVAR
Computes posterior draws of structural shockscompute_structural_shocks.PosteriorBSVARMIX
Computes posterior draws of structural shockscompute_structural_shocks.PosteriorBSVARMSH
Computes posterior draws of structural shockscompute_structural_shocks.PosteriorBSVARSV
Computes posterior draws of the forecast error variance decompositioncompute_variance_decompositions
Computes posterior draws of the forecast error variance decompositioncompute_variance_decompositions.PosteriorBSVAR
Computes posterior draws of the forecast error variance decompositioncompute_variance_decompositions.PosteriorBSVARMIX
Computes posterior draws of the forecast error variance decompositioncompute_variance_decompositions.PosteriorBSVARMSH
Computes posterior draws of the forecast error variance decompositioncompute_variance_decompositions.PosteriorBSVARSV
Bayesian estimation of Structural Vector Autoregressions via Gibbs samplerestimate
Bayesian estimation of a homoskedastic Structural Vector Autoregression via Gibbs samplerestimate.BSVAR
Bayesian estimation of a Structural Vector Autoregression with shocks following a finite mixture of normal components via Gibbs samplerestimate.BSVARMIX
Bayesian estimation of a Structural Vector Autoregression with Markov-switching heteroskedasticity via Gibbs samplerestimate.BSVARMSH
Bayesian estimation of a Structural Vector Autoregression with Stochastic Volatility heteroskedasticity via Gibbs samplerestimate.BSVARSV
Bayesian estimation of a homoskedastic Structural Vector Autoregression via Gibbs samplerestimate.PosteriorBSVAR
Bayesian estimation of a Structural Vector Autoregression with shocks following a finite mixture of normal components via Gibbs samplerestimate.PosteriorBSVARMIX
Bayesian estimation of a Structural Vector Autoregression with Markov-switching heteroskedasticity via Gibbs samplerestimate.PosteriorBSVARMSH
Bayesian estimation of a Structural Vector Autoregression with Stochastic Volatility heteroskedasticity via Gibbs samplerestimate.PosteriorBSVARSV
Forecasting using Structural Vector Autoregressionforecast
Forecasting using Structural Vector Autoregressionforecast.PosteriorBSVAR
Forecasting using Structural Vector Autoregressionforecast.PosteriorBSVARMIX
Forecasting using Structural Vector Autoregressionforecast.PosteriorBSVARMSH
Forecasting using Structural Vector Autoregressionforecast.PosteriorBSVARSV
Waggoner & Zha (2003) row signs normalisation of the posterior draws for matrix Bnormalise_posterior
Plots the median and an interval between two specified percentiles for a sequence of 'K' random variablesplot_ribbon
Plots fitted values of dependent variablesplot.Forecasts
Plots forecast error variance decompositionsplot.PosteriorFEVD
Plots fitted values of dependent variablesplot.PosteriorFitted
Plots historical decompositionsplot.PosteriorHD
Plots impulse responsesplot.PosteriorIR
Plots estimated regime probabilitiesplot.PosteriorRegimePr
Plots structural shocksplot.PosteriorShocks
Plots structural shocks' conditional standard deviationsplot.PosteriorSigma
R6 Class representing the specification of the homoskedastic BSVAR modelspecify_bsvar
R6 Class representing the specification of the BSVAR model with a zero-mean mixture of normals model for structural shocks.specify_bsvar_mix
R6 Class representing the specification of the BSVAR model with Markov Switching Heteroskedasticity.specify_bsvar_msh
R6 Class representing the specification of the BSVAR model with Stochastic Volatility heteroskedasticity.specify_bsvar_sv
R6 Class Representing DataMatricesBSVARspecify_data_matrices
R6 Class Representing IdentificationBSVARsspecify_identification_bsvars
R6 Class Representing PosteriorBSVARspecify_posterior_bsvar
R6 Class Representing PosteriorBSVARMIXspecify_posterior_bsvar_mix
R6 Class Representing PosteriorBSVARMSHspecify_posterior_bsvar_msh
R6 Class Representing PosteriorBSVARSVspecify_posterior_bsvar_sv
R6 Class Representing PriorBSVARspecify_prior_bsvar
R6 Class Representing PriorBSVARMIXspecify_prior_bsvar_mix
R6 Class Representing PriorBSVARMSHspecify_prior_bsvar_msh
R6 Class Representing PriorBSVARSVspecify_prior_bsvar_sv
R6 Class Representing StartingValuesBSVARspecify_starting_values_bsvar
R6 Class Representing StartingValuesBSVARMIXspecify_starting_values_bsvar_mix
R6 Class Representing StartingValuesBSVARMSHspecify_starting_values_bsvar_msh
R6 Class Representing StartingValuesBSVARSVspecify_starting_values_bsvar_sv
Provides posterior summary of Forecastssummary.Forecasts
Provides posterior summary of homoskedastic Structural VAR estimationsummary.PosteriorBSVAR
Provides posterior summary of non-normal Structural VAR estimationsummary.PosteriorBSVARMIX
Provides posterior summary of heteroskedastic Structural VAR estimationsummary.PosteriorBSVARMSH
Provides posterior summary of heteroskedastic Structural VAR estimationsummary.PosteriorBSVARSV
Provides posterior summary of forecast error variance decompositionssummary.PosteriorFEVD
Provides posterior summary of variables' fitted valuessummary.PosteriorFitted
Provides posterior summary of historical decompositionssummary.PosteriorHD
Provides posterior summary of impulse responsessummary.PosteriorIR
Provides posterior summary of regime probabilitiessummary.PosteriorRegimePr
Provides posterior summary of structural shockssummary.PosteriorShocks
Provides posterior summary of structural shocks' conditional standard deviationssummary.PosteriorSigma
Provides summary of verifying hypotheses about autoregressive parameterssummary.SDDRautoregression
Provides summary of verifying homoskedasticitysummary.SDDRvolatility
A 3-variable system of exogenous variables for the US fiscal model for the period 1948 Q1 - 2024 Q1us_fiscal_ex
A 3-variable US fiscal system for the period 1948 Q1 - 2024 Q1us_fiscal_lsuw
Verifies hypotheses involving autoregressive parametersverify_autoregression
Verifies hypotheses involving autoregressive parametersverify_autoregression.PosteriorBSVAR
Verifies hypotheses involving autoregressive parametersverify_autoregression.PosteriorBSVARMIX
Verifies hypotheses involving autoregressive parametersverify_autoregression.PosteriorBSVARMSH
Verifies hypotheses involving autoregressive parametersverify_autoregression.PosteriorBSVARSV
Verifies heteroskedasticity of structural shocks equation by equationverify_volatility
Verifies heteroskedasticity of structural shocks equation by equationverify_volatility.PosteriorBSVAR
Verifies heteroskedasticity of structural shocks equation by equationverify_volatility.PosteriorBSVARMIX
Verifies heteroskedasticity of structural shocks equation by equationverify_volatility.PosteriorBSVARMSH
Verifies heteroskedasticity of structural shocks equation by equationverify_volatility.PosteriorBSVARSV