This page contains replication codes for some of my papers (more to come in the near future) written in R and Rcpp. Most of these codes are quite easy to use and allow to replicate the main findings of the corresponding paper. Notice, however, that these models are fairly complex and some knowledge of Bayesian econometrics/statistics is necessary to properly understand the effect of priors. I do not offer any support for these codes. Although I try to make them as error-free as possible, I can't guarantee this. In case you find an error, please contact me!
UPDATE (Some of these codes use an older version of the R package stochvol and thus might be incompatible with the latest version of stochvol. For time reasons I can't update all the codes below to be compatible with the latest version of stochvol. As a quick solution, you can download an older version of stochvol (2.0.4) here)
We maintain the R toolbox BGVAR which allows for fast and easy estimation of Bayesian GVAR models. The package currently includes several priors, enables to control for heteroscedasticity through stochastic volatility, and comes with several functions to carry out forecasting and structural analysis. Link to CRAN (that includes a detailed vignette on how to use the package).
Replication files for Nowcasting in a Pandemic using Non-Parametric Mixed frequency VARs, with G. Koop, M. Pfarrhofer, L. Onorante and Josef Schreiner, Journal of Econometrics, forthcoming. This code allows estimating the mixed frequency BAVART model, produces now- and forecast densities and (in addition to what we do in the paper) allows for stochastic volatility. Link to the paper. Download the code.
Replication files for Fast and Flexible Inference in Time-varying Parameter Regression models, with N. Hauzenberger, G. Koop and L. Onorante, arXiv:1910.10779 . This code allows to estimate large TVP regression models using our SVD-based algorithm and mixture distributions on the state equations of the regression parameters. Link to the paper. Download the code.
Replication files for Inducing Sparsity and Shrinkage in Time-Varying Parameter Models, with G. Koop and L. Onorante, Journal of Business & Economic Statistics, forthcoming. This code allows to estimate univariate and multivariate state space models using the SAVS estimator described in the paper. Link to the paper. Download the code.
Replication files for Should I stay or should I go? A latent threshold approach to large-scale mixture innovation models, with G. Kastner and M. Feldkircher, Journal of Applied Econometrics, 34/5 (2019): 621-640. This code includes an R package that allows estimating the TTVP regression model (including its VAR variant) as well as to carry out impulse response analysis. Link to the paper. Link to the JAE data archive (that includes replication codes).
Replication files for Adaptive shrinkage in Bayesian vector autoregressive models, with Martin Feldkircher, Journal of Business and Economic Statistics, 37/1 (2019): 27-39. This codes allows to estimate a VAR coupled with a Normal-Gamma prior and estimate impulse responses and carry out forecasting. Moreover, it also allows to estimate VAR models with other priors used in the paper. Link to the paper. Download the code.
Replication files for Threshold cointegration in international exchange rates: a Bayesian approach, with Thomas O. Zörner, International Journal of Forecasting, 35 (2019): 458-473. This code estimates a theshold vector error correction model as described in the paper. The dataset is the same as the one used in the empirical application. Link to the paper. Download the code.
Replication files for Spillovers from US monetary policy: Evidence from a time-varying parameter GVAR model, with J. Crespo Cuaresma, G. Doppelhofer & M. Feldkircher, Journal of the Royal Statistical Society: A, 182/3 (2019): 831-861. This code carries out inference in a TTVP-GVAR model. Caution: The model used in the paper is extremely high dimensional and we used a cluster to compute impulse responses etc. This code could run very slow on a standard desktop computer. Link to the paper. Download the code.
Replication files for The International Transmission of US Shocks – Evidence from Global Vector Autoregressions, with Martin Feldkircher, European Economic Review, 81 (2016): 167-188. This program estimates a GVAR model with Bayesian shrinkage priors and computes impulse responses identified through sign restrictions. Link to the working paper. Download the code.