tvpSvControlCreate#
Purpose#
Create a tvpSvControl structure with default values.
Format#
- adv = tvpSvControlCreate()#
- Returns:
adv (struct) –
An instance of a
tvpSvControlstructure with the following default values:adv.const
Scalar, include constant (1) or not (0). Default = 1.
adv.n_thin
Scalar, thinning factor. Default = 1 (keep every draw).
adv.seed
Scalar, RNG seed for reproducibility. Default = 42.
adv.use_asis
Scalar, enable ASIS interweaving for SV (recommended). Default = 1.
adv.q_b_shape
Scalar, IG prior shape for B drift covariance Q_B diagonal elements. Q_B,jj ~ IG(shape, scale). Default = 6.0.
adv.q_b_scale
Scalar, IG prior scale for Q_B. Default = 0.01 (slow drift).
adv.q_u_shape
Scalar, IG prior shape for U drift covariance Q_U diagonal elements. Default = 6.0.
adv.q_u_scale
Scalar, IG prior scale for Q_U. Default = 0.01.
adv.p0_b_kappa
Scalar, diffuse initialization scale for B FFBS. P_0 = kappa * I. Default = 10.0.
adv.p0_u_kappa
Scalar, diffuse initialization scale for U FFBS. Default = 10.0.
adv.u_bandwidth
Scalar, band-limited drifting U. 0 = full (default), k > 0 = first k off-diagonals per column. Reduces parameters from m(m-1)/2 to m*k for large systems.
adv.xreg
Matrix, exogenous regressors (T x K). Empty = none.
adv.quiet
Scalar, set to 1 to suppress printed output. Default = 0.
Examples#
new;
library timeseries;
struct tvpSvControl adv;
adv = tvpSvControlCreate();
// Tighter drift priors (less time variation in coefficients)
adv.q_b_shape = 10.0;
adv.q_b_scale = 0.001;
// Band-limited U for a larger system
adv.u_bandwidth = 3;
fname = getGAUSSHome("pkgs/timeseries/examples/data/us_macro_quarterly.csv");
y = loadd(fname, "gdp_growth + cpi_inflation + fed_funds");
result = tvpSvFit(y, p=2, n_draws=10000, n_burn=10000, ctl=adv);
Library#
timeseries
Source#
var.src
See also
Functions tvpSvFit()