plotHD#

Purpose#

The plotHD() function is designed to plot the Historical Decompositions from a structural Vector Autoregression (VAR) model.

Format#

plotHD(sOut)#
Parameters:

sOut (struct) – An instance of the svarOut structure containing the results from the svarFit() estimation procedure.

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);

Remarks#

The plotHD() function expects a filled instance of the svarOut structure. It must be called after running svarFit().

See also

Functions svarFit(), svarControlCreate(), plotIRF(), plotFEVD()