Skip to contents

bvarPANELs: Forecasting with Bayesian Hierarchical Panel VARs

Browse package information

bvarPANELs-package bvarPANELs
Forecasting with Bayesian Hierarchical Panel Vector Autoregressions

Data

Upload sample data set

ilo_dynamic_panel
A 4-variable annual system for forecasting labour market outcomes for 189 United Nations countries from 1991 to 2023
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 United Nations countries from 1991 to 2023
ilo_exogenous_forecasts
Data containing future observations for 189 United Nations countries from 2024 to 2029 to be used to forecast with models with ilo_exogenous_variables
ilo_conditional_forecasts
Data containing conditional projections for the logarithm of GDP (gdp) for 189 United Nations countries from 2024 to 2029

Model specification

Choose a model to work with

specify_bvarPANEL
R6 Class representing the specification of the BVARPANEL model

More detailed model specification

Adjust or inspect the specified model

specify_prior_bvarPANEL
R6 Class Representing PriorBVARPANEL
specify_starting_values_bvarPANEL
R6 Class Representing StartingValuesBVARPANEL
specify_panel_data_matrices
R6 Class Representing DataMatricesBVARPANEL

Estimation

Run Bayesian estimation of your model and inspect the outputs

estimate(<BVARPANEL>)
Bayesian estimation of a Bayesian Hierarchical Panel Vector Autoregression using Gibbs sampler
estimate(<PosteriorBVARPANEL>)
Bayesian estimation of a Bayesian Hierarchical Panel Vector Autoregression using Gibbs sampler
specify_posterior_bvarPANEL
R6 Class Representing PosteriorBVARPANEL

Posterior summaries

Analyse the posterior summaries of the posterior estimation outcomes

summary(<ForecastsPANEL>)
Provides posterior summary of country-specific Forecasts
summary(<PosteriorBVARPANEL>)
Provides posterior estimation summary for Bayesian Hierarchical Panel Vector Autoregressions
summary(<PosteriorFEVDPANEL>)
Provides posterior summary of forecast error variance decompositions

Forecasting

Predict future values of your variables

forecast(<PosteriorBVARPANEL>)
Forecasting using Hierarchical Panel Vector Autoregressions
ilo_conditional_forecasts
Data containing conditional projections for the logarithm of GDP (gdp) for 189 United Nations countries from 2024 to 2029
ilo_exogenous_forecasts
Data containing future observations for 189 United Nations countries from 2024 to 2029 to be used to forecast with models with ilo_exogenous_variables

Structural analyses

Compute interpretable outcomes

compute_variance_decompositions(<PosteriorBVARPANEL>)
Computes posterior draws of the forecast error variance decomposition

Plot your results

Prepare beautiful and informative plots for your analyses

plot(<ForecastsPANEL>)
Plots fitted values of dependent variables
plot(<PosteriorFEVDPANEL>)
Plots forecast error variance decompositions