Readme file for „Inducing Sparsity and Shrinkage in Time-Varying Parameter Models“ by Florian Huber, Gary Koop, and Luca Onorante
The zip folder contains two R files necessary to estimate a TVP-VAR using the SAVS estimator.
- ng_SAVS.R contains code to estimate a univariate TVP regression model using various shrinkage priors and SAVS. Notice that this function also contains a wide variety of extra arguments we did not include in the paper.
- estim.VAR.R performs equation-by-equation estimation of the VAR model (without using parallel computing for clarity and simplicity). If you would like to speed this up significantly you could just wrap a snowfall apply around the relevant parts in the code. The code also computes multi-step-ahead forecasts for Y(T+h).
- The FFBS step is coded in Rcpp (see threshold_functions.cpp) and can be used within R (conditional on installing Rcpp and RcppArmadillo in R).
- Finally, datasetMNg.RData contains the dataset used.
Notice that the code basically estimates the VAR and computes multi-step-ahead forecasts for Y(T+1). This code currently does not do IRFs. These can easily be implemented and, non-user friendly versions, are readily available from the corresponding upon request.
Contact: florian.huber@sbg.ac.at