Stata tools for simulating and visualizing structural VAR models.
net install svartools, from("https://raw.githubusercontent.com/EconSolider/svartools/main/") replaceTo update later:
ado update svartoolsTo uninstall:
ado uninstall svartoolssim_svar— simulate SVAR(p) time series via Matairf_dualband— plot impulse responses with dual confidence bands
After installing, see help sim_svar and help irf_dualband.
matrix A = (1, 0 \ 0.5, 1)
matrix Phi = (0.6, 0.1 \ 0.2, 0.7)
sim_svar, nvars(2) lags(1) coef(Phi) amat(A) nobs(500)
var y1 y2, lags(1)
svar y1 y2, lags(1) aeq(...) beq(...)
irf create svar1, set(myirf, replace) step(36)
irf_dualband, irffile("myirf.irf") impulse(y1) response(y2) ///
irfname(svar1) normalizeMIT
