Package: bpvars 1.0.0.9000

Tomasz Woźniak

bpvars: Forecasting with Bayesian Panel Vector Autoregressions

Provides Bayesian estimation and forecasting of dynamic panel data using Bayesian Panel Vector Autoregressions with hierarchical prior distributions. The models include country-specific Vector Autoregressions (VARs) that share a global prior distribution that extend the model by Jarociński (2010) <doi:10.1002/jae.1082>. Under this prior expected value, each country's system follows a global VAR with country-invariant parameters. Further flexibility is provided by the hierarchical prior structure that retains the Minnesota prior interpretation for the global VAR and features estimated prior covariance matrices, shrinkage, and persistence levels. Bayesian forecasting is developed for models including exogenous variables, allowing conditional forecasts given the future trajectories of some variables and restricted forecasts assuring that rates are forecasted to stay positive and less than 100. The package implements the model specification, estimation, and forecasting routines, facilitating coherent workflows and reproducibility. It also includes automated pseudo-out-of-sample forecasting and computation of forecasting performance measures. Beautiful plots, informative summary functions, and extensive documentation complement all this. Extraordinary computational speed is achieved thanks to employing frontier econometric and numerical techniques and algorithms written in 'C++'. The 'bpvars' package is aligned regarding objects, workflows, and code structure with the 'R' packages 'bsvars' by Woźniak (2024) <doi:10.32614/CRAN.package.bsvars> and 'bsvarSIGNs' by Wang & Woźniak (2025) <doi:10.32614/CRAN.package.bsvarSIGNs>, and they constitute an integrated toolset. Copyright: 2025 International Labour Organization. The International Labour Organization should not be held responsible for any issues arising from the use of the 'bpvars' package or from the results obtained with it.

Authors:Tomasz Woźniak [aut, cre], Miguel Sanchez-Martinez [ctb], International Labour Organization [cph]

bpvars_1.0.0.9000.tar.gz
bpvars_1.0.0.9000.zip(r-4.7)bpvars_1.0.0.9000.zip(r-4.6)bpvars_1.0.0.9000.zip(r-4.5)
bpvars_1.0.0.9000.tgz(r-4.6-x86_64)bpvars_1.0.0.9000.tgz(r-4.6-arm64)bpvars_1.0.0.9000.tgz(r-4.5-x86_64)bpvars_1.0.0.9000.tgz(r-4.5-arm64)
bpvars_1.0.0.9000.tar.gz(r-4.7-arm64)bpvars_1.0.0.9000.tar.gz(r-4.7-x86_64)bpvars_1.0.0.9000.tar.gz(r-4.6-arm64)bpvars_1.0.0.9000.tar.gz(r-4.6-x86_64)
bpvars_1.0.0.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
bpvars/json (API)
NEWS

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

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

Pkgdown/docs site:https://bsvars.org

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
Datasets:
  • country_grouping_incomegroup - A vector with country grouping by income group for 189 countries
  • country_grouping_region - A vector with country grouping by region for 189 countries
  • country_grouping_subregionbroad - A vector with country grouping by subregion for 189 countries
  • country_grouping_subregiondetailed - A vector with country grouping by detailed subregion for 189 countries
  • ilo_conditional_forecasts - Data containing future observations for 189 countries from 2025 to 2027 to be used for conditional forecasts given the future values of gdp.
  • ilo_dynamic_panel - A 4-variable annual system for forecasting labour market outcomes for 189 countries from 1991 to 2024
  • ilo_dynamic_panel_missing - A 4-variable annual system for forecasting labour market outcomes for 189 countries to 2024 containing only actual observations
  • ilo_exogenous_forecasts - Data containing future observations for 189 countries from 2025 to 2027 to be used to forecast with models with 'ilo_exogenous_variables'
  • ilo_exogenous_variables - A 3-variable annual system for of dummy observations for 2008, 2020, and 2021 to be used in the estimation of the Panel VAR model for 189 countries from 1991 to 2024
  • ilo_exogenous_variables_missing - A 3-variable annual system for of dummy observations for 2008, 2020, and 2021 to be used in the estimation of the Panel VAR model for 189 countries to 2024 containing observations for matching periods from 'ilo_dynamic_panel_missing'

On CRAN:

Conda:

bayesianbsvarsbvarpanelsdynamic-panel-dataforecastinghierarchical-modelsvarsopenblascppopenmp

5.35 score 5 stars 2 scripts 267 downloads 19 exports 17 dependencies

Last updated from:63e5807116. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK219
linux-devel-x86_64OK210
source / vignettesOK321
linux-release-arm64OK254
linux-release-x86_64OK206
macos-release-arm64OK200
macos-release-x86_64OK431
macos-oldrel-arm64OK245
macos-oldrel-x86_64OK450
windows-develOK282
windows-releaseOK241
windows-oldrelOK221
wasm-releaseOK160

Exports:compute_forecast_performanceforecastforecast_poos_recursivelyspecify_bvarGroupPANELspecify_bvarGroupPriorPANELspecify_bvarPANELspecify_bvarsspecify_panel_data_matricesspecify_poosf_exercisespecify_posterior_bvarGroupPANELspecify_posterior_bvarGroupPriorPANELspecify_posterior_bvarPANELspecify_posterior_bvarsspecify_prior_bvarPANELspecify_prior_bvarsspecify_starting_values_bvarGroupPANELspecify_starting_values_bvarGroupPriorPANELspecify_starting_values_bvarPANELspecify_starting_values_bvars

Dependencies:alabamabsvarscodagenericsGIGrvglatticenleqslvnumDerivqrngR6RcppRcppArmadilloRcppProgressRcppTNspacefillrstochvolTruncatedNormal

Forecasting with Bayesian Panel Vector Autoregressions Using the R Package bpvars

Rendered frombpvars_vignette.Rnwusingknitr::knitron May 20 2026.

Last update: 2026-04-20
Started: 2026-04-20

Readme and manuals

Help Manual

Help pageTopics
Forecasting with Bayesian Panel Vector Autoregressionsbpvars-package bpvars
Computes forecasting performance measures for recursive pseudo-out-of-sample forecastscompute_forecast_performance
Computes forecasting performance measures for recursive pseudo-out-of-sample forecastscompute_forecast_performance.ForecastsPANELpoos
Computes posterior draws of the forecast error variance decompositioncompute_variance_decompositions.PosteriorBVARGROUPPANEL
Computes posterior draws of the forecast error variance decompositioncompute_variance_decompositions.PosteriorBVARPANEL
Computes posterior draws of the forecast error variance decompositioncompute_variance_decompositions.PosteriorBVARs
A vector with country grouping by income group for 189 countriescountry_grouping_incomegroup
A vector with country grouping by region for 189 countriescountry_grouping_region
A vector with country grouping by subregion for 189 countriescountry_grouping_subregionbroad
A vector with country grouping by detailed subregion for 189 countriescountry_grouping_subregiondetailed
Bayesian estimation of a Bayesian Hierarchical Panel Vector Autoregression with fixed or estimated country groupingestimate.BVARGROUPPANEL
Bayesian estimation of a Bayesian Hierarchical Panel Vector Autoregression with fixed or estimated country grouping for global priorsestimate.BVARGROUPPRIORPANEL
Bayesian estimation of a Bayesian Hierarchical Panel Vector Autoregression using Gibbs samplerestimate.BVARPANEL
Bayesian estimation of a Bayesian Hierarchical Vector Autoregressions for cubic data using Gibbs samplerestimate.BVARs
Bayesian estimation of a Bayesian Hierarchical Panel Vector Autoregression with fixed or estimated country groupingestimate.PosteriorBVARGROUPPANEL
Bayesian estimation of a Bayesian Hierarchical Panel Vector Autoregression with fixed or estimated country grouping for global priorsestimate.PosteriorBVARGROUPPRIORPANEL
Bayesian estimation of a Bayesian Hierarchical Panel Vector Autoregression using Gibbs samplerestimate.PosteriorBVARPANEL
Bayesian estimation of a Bayesian Hierarchical Vector Autoregressions for cubic data using Gibbs samplerestimate.PosteriorBVARs
Bayesian recursive pseudo-out-of-sample forecastingforecast_poos_recursively
Bayesian recursive pseudo-out-of-sample forecastingforecast_poos_recursively.BVARGROUPPANEL
Bayesian recursive pseudo-out-of-sample forecastingforecast_poos_recursively.BVARGROUPPRIORPANEL
Bayesian recursive pseudo-out-of-sample forecastingforecast_poos_recursively.BVARPANEL
Bayesian recursive pseudo-out-of-sample forecastingforecast_poos_recursively.BVARs
Forecasting using Hierarchical Panel Vector Autoregressionsforecast.PosteriorBVARGROUPPANEL
Forecasting using Hierarchical Panel Vector Autoregressionsforecast.PosteriorBVARGROUPPRIORPANEL
Forecasting using Hierarchical Panel Vector Autoregressionsforecast.PosteriorBVARPANEL
Forecasting using Hierarchical Vector Autoregressions for Dynamic Panel Dataforecast.PosteriorBVARs
Data containing future observations for 189 countries from 2025 to 2027 to be used for conditional forecasts given the future values of gdp.ilo_conditional_forecasts
A 4-variable annual system for forecasting labour market outcomes for 189 countries from 1991 to 2024ilo_dynamic_panel
A 4-variable annual system for forecasting labour market outcomes for 189 countries to 2024 containing only actual observationsilo_dynamic_panel_missing
Data containing future observations for 189 countries from 2025 to 2027 to be used to forecast with models with 'ilo_exogenous_variables'ilo_exogenous_forecasts
A 3-variable annual system for of dummy observations for 2008, 2020, and 2021 to be used in the estimation of the Panel VAR model for 189 countries from 1991 to 2024ilo_exogenous_variables
A 3-variable annual system for of dummy observations for 2008, 2020, and 2021 to be used in the estimation of the Panel VAR model for 189 countries to 2024 containing observations for matching periods from 'ilo_dynamic_panel_missing'ilo_exogenous_variables_missing
Plots fitted values of dependent variablesplot.ForecastsPANEL
Plots forecast error variance decompositionsplot.PosteriorFEVDPANEL
R6 Class representing the specification of the BVARGROUPPANEL modelspecify_bvarGroupPANEL
R6 Class representing the specification of the BVARGROUPPRIORPANEL modelspecify_bvarGroupPriorPANEL
R6 Class representing the specification of the BVARPANEL modelspecify_bvarPANEL
R6 Class representing the specification of the BVARs modelspecify_bvars
R6 Class Representing DataMatricesBVARPANELspecify_panel_data_matrices
R6 Class Representing specification of the pseudo-out-of-sample forecasting exercisespecify_poosf_exercise
R6 Class Representing PosteriorBVARGROUPPANELspecify_posterior_bvarGroupPANEL
R6 Class Representing PosteriorBVARGROUPPRIORPANELspecify_posterior_bvarGroupPriorPANEL
R6 Class Representing PosteriorBVARPANELspecify_posterior_bvarPANEL
R6 Class Representing PosteriorBVARsspecify_posterior_bvars
R6 Class Representing PriorBVARPANELspecify_prior_bvarPANEL
R6 Class Representing PriorBVARsspecify_prior_bvars
R6 Class Representing StartingValuesBVARGROUPPANELspecify_starting_values_bvarGroupPANEL
R6 Class Representing StartingValuesBVARGROUPPRIORPANELspecify_starting_values_bvarGroupPriorPANEL
R6 Class Representing StartingValuesBVARPANELspecify_starting_values_bvarPANEL
R6 Class Representing StartingValuesBVARsspecify_starting_values_bvars
Provides posterior summary of country-specific Forecastssummary.ForecastsPANEL
Provides posterior estimation summary for Bayesian Hierarchical Panel Vector Autoregressionssummary.PosteriorBVARGROUPPANEL
Provides posterior estimation summary for Bayesian Hierarchical Panel Vector Autoregressions with group-specific global priorsummary.PosteriorBVARGROUPPRIORPANEL
Provides posterior estimation summary for Bayesian Hierarchical Panel Vector Autoregressionssummary.PosteriorBVARPANEL
Provides posterior estimation summary for Bayesian Vector Autoregressions for dynamic panel datasummary.PosteriorBVARs
Provides posterior summary of forecast error variance decompositionssummary.PosteriorFEVDPANEL