*! version 16.0 18march2021

[VAR-NR] nr_set() -- Set narrative sign restriction on given shock for given time period

Syntax

transmorphic scalar
nr_set(real scalar start, real scalar end, string scalar nr_type, string scalar shock, string scalar affected, transmorphic scalar nsr)

Description

nr_set(start,end,nr_type,shock,affected,S)
imposes a narrative sign restriction on part of the historical decomposition of
a given variable's fluctuations in response to the specified structural shock.
start and end 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 start as yq(2000,1)
and end as yq(2002,4). nr_type indicates what type of narrative
restriction is implemented. Following the definitions provided by Antolin-Diaz
and Rubio-Ramirez (2018), this argument accepts the strings "positive",
"negative", "mostimportant", "leastimportant", "overwhelming", and "negligible".
"positive" and "negative" may also be shortened to "pos", "+", "neg", or "-".
shock should be loaded with the name of the shock that is
being restricted as it is entered in shock_name() (if the
shock is not named, the corresponding variable name should be entered instead).
affected should be filled with the name (as a string) of the endogenous
variable whose historical decomposition of the specified shock is to be
restricted. nsr is the narrative sign restriction object output by
nr_create() that is to be updated. The function has no
output, but updates nsr.

Remarks

nr_set() can be called in Stata using function
var_nr_narr_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).