*! version 16.0 18march2021

[VAR-NR] irf_plot() -- plot impulse response(s) with confidence bands

Syntax

void
irf_plot(transmorphic scalar irs, struct irf_bands_struct scalar irb, struct var_struct scalar VAR, struct opt_struct scalar opts)

Description

irf_plot() plots the impulse responses to the structural shocks, irs,
identified as specified in opts for the SVAR stored in VAR. It also
plots confidence intervals, which are entered as irb.

If the SVAR was identified using short-run or long-run zero restrictions,
irs should be filled with the output from irf_funct() and
irb should be filled with the ouptut from
irf_bands_funct().

If the SVAR was identified using [narrative] sign restrictions, irs should
be filled with the object indexed by the key string "median" in the associative
array output by sr_analysis_funct() with the "irf"
option specified. irb should be filled with the object indexed by "bands"
from the same associative array. In this case, the median draw is plotted and
confidence bands are the draws corresponding to the pctg-percentiles as
set by opts.

Options for impulse response function plotting are set to defaults when
var_nr is run and are adjusted using
var_nr_options in Stata or using standard
structure.element structure syntax in Mata. Options affecting IRF
plotting are outlined below. Note that the options that determine the
irf_funct() and irf_bands_funct()
calculations also affect irf_plot(), so these should be kept
constant for the purpose of plotting.

Options

save_fmt specifies the file type that output plots should be saved as.
Outputs are automatically saved to the current working directory. If "none" is
specified, then the plots are displayed, but not saved. "none" is the default.

shck_plt allows the user to select just one shock for which impulse
responses should be plotted. If "all" is specified, irf_plot() will
plot impulse responses for all endogenous variables. If a variable name or, in
the [narrative] sign restrictions case, a shock name is specified, the function
will only plot the impulse response for the specified shock. "all" is the
default.

Remarks

irf_plot() can be called in Stata using function
var_nr_irf_plot.

For an overview of functions in the toolbox, see

[VAR-NR] var_nr Toolbox -- Stata functions and Mata functions.

Sources

Code follows Kilian and Lutkepohl's notation in
Structural Vector Autoregressive Analysis (2016).