svarControlCreate#
Purpose#
Create an svarControl structure with default values for sign-restricted SVAR identification.
Format#
- ctl = svarControlCreate()#
- Returns:
ctl (struct) –
An instance of an
svarControlstructure with the following default values:ctl.sign_restr
Nx4 matrix, sign restrictions on impulse responses. Each row specifies one restriction with columns:
1
Variable index (1 to m) — the responding variable.
2
Shock index (1 to m) — the structural shock.
3
Horizon (0 = impact, 1 = one step ahead, etc.).
4
Sign: 1 for positive response, -1 for negative response.
ctl.zero_restr
Nx3 matrix, zero restrictions. Reserved for future ARW2018 implementation. Currently raises an error if populated. Columns: variable, shock, horizon.
ctl.max_tries
Scalar, maximum rotation attempts per posterior draw. Default = 10000.
ctl.min_accept_rate
Scalar, minimum acceptable fraction of draws yielding a valid rotation. An error is raised if the rate falls below this threshold. Default = 0.01.
ctl.n_ahead
Scalar, number of IRF horizons. Default = 20.
ctl.seed
Scalar, RNG seed for reproducibility. Default = 42.
ctl.quiet
Scalar, set to 1 to suppress printed output. Default = 0.
Examples#
new;
library timeseries;
ctl = svarControlCreate();
// Define sign restrictions: [variable, shock, horizon, sign]
// Monetary shock (shock 3): FFR up, GDP down, CPI down
ctl.sign_restr = { 3 3 0 1,
1 3 0 -1,
2 3 0 -1 };
// Increase max attempts for tight restrictions
ctl.max_tries = 50000;
ctl.n_ahead = 24;
Remarks#
The sign_restr and zero_restr fields are empty by default. At least
one sign restriction must be set before calling svarIdentify() or
svarIrf().
Library#
timeseries
Source#
svar.src
See also
Functions svarIdentify(), svarIrf()