*! version 16.0 18march2021

[VAR-NR] var_nr Toolbox -- Mata functions

Contents

[VAR-NR]
Manual entry Purpose

+
+
---+ Calculations +

+
+

irf_funct() calculate impulse responses of SVAR

irf_bands_funct() calculate confidence bands for impulse responses of SVAR

fevd_funct() calculate forecast error variance decompositions of SVAR

fevd_bands_funct() calculate confidence bands for forecast error variance decompositions of SVAR

hd_funct() calculate historical decompositions of SVAR

+
+
---+ Sign & Narrative Restrictions +

+
+

sign_restrict() routine to generate sign-identified credible set for SVAR

narr_sign_restrict() routine to generate sign- and narrative-sign-identified credible set for SVAR

shock_create() initialize object storing sign restrictions on impulse responses to structural shocks

shock_name() input names of structural shocks (for plotting)

shock_set() set sign restriction on given shock

nr_create() initialize object storing narrative sign restrictions on historical decomposition

nr_set() set narrative sign restriction on given shock for given time period

sr_analysis_funct() calculate IRFs, FEVDs, and HDs for [narrative] sign-identified SVARs

+
+
---+ Plotting & Options +

+
+

irf_plot() plot impulse response(s)

fevd_plot() plot forecast error variance decomposition(s)

hd_plot() plot historical decomposition of structural shocks

opt_display() displays current options settings

+
+
---+ Subfunctions +

+
+

var_funct() creates var_struct structure storing elements needed for SVAR analysis

opt_set() initializes opt_struct structure with default options

check_mat() discerns whether drawn VAR satisfies sign restrictions

check_nsr() discerns whether drawn VAR satisfies narrative sign restrictions

identify() calculates the impact matrix using short-run zero, long-run zero, or sign restrictions

orth_norm() generates a random orthonormal matrix

posterior_draw() draws coefficient and variance-covariance matrices from their posteriors

prctile() calculates a percentile of elements in a real matrix

prctile_or_mean() calculates a percentile or mean of elements across multiple real matrices

var_simulation() same as var_funct but recalculates input VAR's elements with input simulated data

Description

The above functions are included in the var_nr Toolbox (Danziger, Koch, Kuchek 2021) and run in Mata.

Remarks

For corresponding Stata functions, see

[VAR-NR] var_nr Toolbox Stata functions