Adds automatically rows to 'shockinfo' data.frame for appropriate use in irf
.
add_shockinfo(shockinfo=NULL, shock=NULL, restriction=NULL, sign=NULL, horizon=NULL,
prob=NULL, scale=NULL, global=NULL, horizon.fillup=TRUE)
Dataframe to append shocks. If shockinfo=NULL
appropriate dataframe for sign-restrictions will be created.
String element. Variable of interest for structural shock. Only possible to add restrictions to one structural shock at a time.
Character vector with variables that are supposed to be sign restricted.
Character vector with signs.
Numeric vector with horizons to which restriction should hold. Set horizon.fillup
to FALSE
to just restrict one specific horizon.
Number between zero and one determining the probability with which restriction is supposed to hold.
Scaling parameter.
If set to TRUE
, shock is defined as global shock.
Default set to TRUE
, horizon specified up to given horizon. Otherwise just one specific horizon is restricted.
This is only possible for sign restriction, hence if ident="sign"
in get_shockinfo()
.