*! version 16.0 18march2021

[VAR-NR] narr_sign_restrict() -- Routine to generate sign- and narrative-sign-identified credible set for SVAR

Syntax

transmorphic scalar
narr_sign_restrict(struct var_struct scalar VAR, transmorphic scalar S, struct opt_struct scalar opts, transmorphic scalar nsr)

Description

narr_sign_restrict(VAR,S,opts,nsr) generates a credible set
of SVARs identified using both sign and narrative sign restrictions
(Antolin-Diaz & Rubio-Ramirez 2018). Its output is an associative array
containing VAR var_struct structures that satisfy the sign restrictions on
the IRF specified in S as well as the narrative restrictions on the
historical decomposition specified in nsr (more details on setting these
restrictions in the help files for shock_create()) and
nr_create().

narr_sign_restrict() is an extension of the traditional sign restriction
algorithm. This is outlined in the help file for
sign_restrict(). narr_sign_restrict() adds an
additional step by verifying that narrative restrictions are satisfied for any
draw for which sign restrictions are satisfied. If so, the draw is retained.
Otherwise, it is discarded, and the algorithm begins anew.

If the user wishes to use only narrative sign restrictions on the historical
decomposition without enforcing sign restrictions on the impulse responses, they
will need to generate an S object using shock_create()
and leave it unrestricted (simply by never filling it using
shock_set()).

Options for (narrative) sign restriction identification and functioning 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. Relevant options are outlined
below. Note that options affecting impulse response calculations and
historical decompositions are naturally relevant as well, and are outlined in
the help files for irf_funct() and hd_funct().

Options

ndraws specifies the target number of successful draws. When
sign_restrict has generated the target number of draws that satisfy
the given sign restrictions, the functions stops. This value should be a
positive integer.

err_lmt specifies the maximum number of draws that fail to satisfy the
sign restrictions on the impulse responses before the first successful draw that
the sign_restrict algorithm should tolerate. If this threshold is met, the
function aborts with an error message. This value should be a positive integer.

updt indicates whether the sign_restrict function should
periodically update the user on its progress. Options are "yes" or "no". If
"yes", the function will display the number of draws satisfying the sign
restrictions, the number of draws satisfying both sign and narrative sign
restrictions, and the number of total draws so far at the interval set by the
updt_frqcy option.

updt_frqcy specifies how often the sign_restrict function updates the
user on its progress if updt is set to "yes". After every updt_frqcy
draws, function prints the number of draws satisfying the sign restrictions, the
number of draws satisfying both sign and narrative sign restrictions, and the
number of total draws so far. This value should be a positive integer.

Remarks

narr_sign_restrict() can be called in Stata using function
var_nr_sign_restrict.

For an overview of functions in the toolbox, see

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

Sources

Code implements narrative sign restriction identification as proposed by
Antolin-Diaz and Rubio-Ramirez in Narrative Sign Restrictions for SVARs
(2018). Code follows Kilian and Lutkepohl's notation in
Structural Vector Autoregressive Analysis (2016).