*! version 16.0 23march2021

[VAR-NR] hd_funct() -- Calculate historical decomposition of SVAR

Syntax

transmorphic scalar
hd_funct(struct var_struct scalar VAR, struct opt_struct scalar opts)

Description

var_nr_hd returns an associative array containing historical decompositions
for the structural vector autoregression with elements contained in structure
VAR using identification specified in structure opts. If VAR and/or
opts are empty or missing crucial elements, hd_funct() will fail.

The associative array is indexed by the key strings "init", "cconst", "ltrend",
"qtrend", "exo", and "shock", which correspond to, respectively, the
contributions from the initial value, constant, linear trend, quadratic trend,
exogenous variable(s), and the structual shocks. These keys access matrices
except for "shock", which accesses an associative array indexed by real integers
that access matrices storing the historical decomposition of each structural
shock.

Options for impulse response function identification and estimation are set to
defaults when var_nr is run. They are adjusted using
var_nr_options in Stata or using standard
structure.element structure syntax in Mata. Options affecting HD
calculation are outlined below:

Options

ident specifies the method used to identify the model.
This option will accept one of three strings: "oir", "bq", or
"sr". "oir" specifies zero short-run restrictions; "bq"
specifies zero long-run restrictions; and "sr" specifies sign
restrictions (pure and/or narrative).

Remarks

hd_funct() can be called in Stata using function
var_nr_hd.

For an overview of functions in the toolbox, see

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

Sources

Code for this function is adapted from Ambrogio Cesa-Bianchi's VAR Toolbox.
Code follows Kilian and Lutkepohl's notation in
Structural Vector Autoregressive Analysis (2016).