*! version 16.0 18march2021

[VAR-NR] var_nr_narr_set -- Set narrative sign restriction on given shock for given time period

Syntax

var_nr_narr_set
,

nsrname("string")
startpd(num)
shock("string")
[endpd(num)
positive
negative
mostimportant
leastimportant
overwhelming
negligible
affecting("string")]

Description

var_nr_narr_set imposes a narrative sign restriction on part of the
historical decomposition of a given variable's fluctuations in response to the
specified structural shock. The fuction populates the object created by
var_nr_narr_create specified in nsrname.

startpd and endpd set the start and end periods through which the
restriction is enforced. If these are equal, the restriction is imposed on a
single period. These should be in the format of the timevar set by
tsset. For example, if the user's time variable is quarterly, and
they wish to impose a restriction on the first quarter of the year 2000 through
the last quarter in 2002, they should enter startpd as
yq(2000,1) and endpd as yq(2002,4).

The type of narrative restriction must be identified. Following the definitions
provided by Antolin-Diaz and Rubio-Ramirez (2018), options are positive,
negative, mostimportant, leastimportant,
overwhelming and negligible. Only one of these may be specified.

shock should be loaded with the name of the shock that is being restricted
as it is entered in var_nr_shock_name (if the shock is not named, the
corresponding variable name should be entered instead). affecting should
be filled with the name (as a string) of the endogenous variable whose
historical decomposition of the specified shock is to be restricted.

Remarks

var_nr_narr_set runs the Mata function nr_set().

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).