plotHD¶
Purpose¶
The plotHD() function is designed to plot the Historical Decompositions from a structural Vector Autoregression (VAR) model.
Format¶
Example¶
// Load library
new;
library tsmt;
/*
** Data import
*/
lutkepohl2 = loadd(getGAUSShome("pkgs/tsmt/examples/lutkepohl2.dta"));
// Filter data
lutkepohl2 = selif(lutkepohl2, lutkepohl2[., "qtr"] .<= "1978-12-30");
// Set Y
y = packr(lutkepohl2[., "qtr" "dln_inv" "dln_inc" "dln_consump"]);
// Set up output structures
struct svarOut sout;
// Compute structural VAR model
sout = svarFit(Y);
// Plot the IRFs
plotHD(sOut);