3. Structural VAR Modeling
An svar_model object represents a (possibly
Markov-switching) structural vector autoregression – the
structural form is parameterized and estimated directly, so
there is no separate “estimate a reduced form, then rotate it”
step. Almost everything else (data handling, estimation options,
forecasting, decompositions, fan charts, bootstrap, Bayesian
estimation, adding regime switching) works exactly as for
reduced-form VARs; see Reduced-form VAR Modeling for the full
worked example. This page covers what is specific to the
structural case. A structural VAR is solved like every VAR, from its
parameters (see Reduced-form VAR Modeling): its impact
matrix is \(A_0^{-1}\mathrm{diag}(\sigma)\), and it honors
solve_check_stability.
3.1. The model
with \(r_{t} = 1, 2, \dots, h\) and transition probabilities \(p_{r_{t}, r_{t+1}}(I_{t})\), structural shocks \(\varepsilon_{t} \sim N(0, I)\), and \(\sigma(r_{t}) = (\sigma_{1}(r_{t}), \dots, \sigma_{n}(r_{t}))\) the standard deviations of the structural shocks.
\(A_{0}(r_{t})\) is the contemporaneous-impact matrix. It is normalized to have a unit diagonal (
a0_i_i = 1): equation \(i\) is normalized on its own variable, and the scale of its shock is the estimated \(\sigma_{i}\).\(A_{1}, \dots, A_{p}\) are the lag-coefficient matrices, and \(C\) the coefficients on the deterministic / exogenous block \(x_{t}\) (constant, declared exogenous regressors, and lags of \(y\)).
The estimated parameters are named by analogy with the matrices:
a0(row, col)– contemporaneous coefficients (off-diagonal entries of \(A_{0}\); the diagonal is fixed at1).a1(row, col), …,ap(row, col)– lag coefficients (a(row, col), with the lag index omitted, refers to all lags).c(row, col)– coefficients on the exogenous / constant block.sigma_<var>– the standard deviation of the shock of the equation of<var>.
row and col are integers or endogenous-variable names,
e.g. a0(R, PAI) or a1(2, 3).
3.2. Creating an SVAR
endog = {'PAIOIL','GROWTH','PAI','R','EXRATE'};
exog = {};
nlags = 4;
const = true;
mdl = svar_model(endog, ...
lag_length = nlags, ...
constant_term = const, ...
deterministic_vars = exog);
(The factory mirrors rfvar_model’s shape; the legacy
constructor signature was svar(varlist, exog, nlags, constant,
markov_chains) positionally.)
3.3. Identification
A structural VAR with \(n\) endogenous variables has
\(n(n - 1)/2\) more free parameters in \(A_{0}\) than
the data can pin down, so identifying restrictions must be
supplied. In RISE these are ordinary parameter restrictions on
a0 (and, if you wish, on the lag coefficients), passed to
estimate in the linear-restrictions cell array – the same
mechanism used for block-exogeneity restrictions in the
reduced-form VAR chapter.
A recursive (Cholesky-type) identification orders the variables and zeroes the entries of \(A_{0}\) above the diagonal, so that variable 1 is not affected contemporaneously by any other shock, variable 2 only by shock 1, and so on:
linres = {};
for ii = 1:numel(endog)
for jj = ii+1:numel(endog)
linres{end+1, 1} = sprintf('a0(%s,%s)=0', endog{ii}, endog{jj}); %#ok<SAGROW>
end
end
Here endog is the list given to svar_model, and the shock
epsilon<k> belongs to the k-th variable of that list. The
reduced-form counterpart, identify(m, 'choleski', shock_names) on
an rfvar_model declared with the same list, follows the same
declaration order and gives the same impulse responses, the k-th
shock name standing for epsilon<k> (see
Reduced-form VAR Modeling).
Exclusion (zero) restrictions can equally be imposed one at a
time, e.g. 'a0(PAIOIL,R)=0' (“the policy-rate shock has no
contemporaneous effect on oil-price inflation”), and you can mix
them with restrictions on the lag coefficients
('a1(PAIOIL,GROWTH)=0', …).
3.4. Estimation
Estimation is exactly as for a reduced-form VAR – pass the model, a database of time series (see Forecasting and simulation), the estimation sample, a prior if wanted, and the identifying restrictions:
mdlest = estimate(mdl, ...
data = db, ...
estim_start_date = date2serial(db.GROWTH.start), ...
estim_end_date = date2serial(db.GROWTH.finish), ...
estim_linear_restrictions = linres);
Without a prior, estimate fits the SVAR by maximum likelihood: every
structural parameter (A0, the lags, the constants and the shock standard
deviations) is estimated under the identifying restrictions, and their
identification is checked before the search, so a specification they do
not identify stops with an error that names the parameters involved. The
search starts from the reduced-form OLS estimates under A0 = I. estimate
reports the log likelihood at the estimates and standard errors from the
observed information (the inverse Hessian of minus the log likelihood);
there is no posterior and no marginal data density, and the results table
marks the parameters ML. Routines that draw from a prior or a posterior
refuse an estimate obtained this way.
Bayesian estimation uses the same rise.engine.var.var_priors.minnesota
function introduced in Reduced-form VAR Modeling:
var_prior=rise.engine.var.var_priors.minnesota(endog,const,exog,nlags,db,...
tightness=0.1,...
lag_decay=1,...
ar_first_lag=0.9);
No VAR prior covers \(A_{0}\): its prior is the one you give in
estim_priors (and the restrictions). A reduced-form prior covers no
structural parameter: evaluated at the reduced form that \(A_{0}\),
the lags and \(\sigma\) imply, it is a weight on all of them, the
density of none (see below). Your priors in estim_priors and the
reduced-form prior then bear on related parameters, and the prior is
their product. For a marginal data density, give a proper prior to every
free structural parameter, the lags and constants included: RISE then
normalizes the product by Monte Carlo, from draws of your priors (see
Combined priors in Reduced-form VAR Modeling). A free
parameter without a prior leaves the product without a normalizing
constant: estimate then reports no marginal data density and says
which parameters lack a proper prior. Until 30 October 2026 the
reduced-form prior covered the lags, and the marginal data density
reported with priors on \(A_{0}\) and \(\sigma\) only was that of
the unnormalized product. A structural prior covers the lags, and
\(\sigma\) with its Gamma block, given \(A_{0}\), and needs no
normalization.
- mdlest_bayes = estimate(mdl, …
data = db, … estim_start_date = date2serial(db.GROWTH.start), … estim_end_date = date2serial(db.GROWTH.finish), … estim_var_prior = var_prior, … estim_linear_restrictions = linres);
After estimation, inspect the structural form:
print_structural_form(mdlest)
3.5. Reduced-form and structural lag priors
An SVAR’s prior usually has two parts: a prior on \(A_{0}\) (the
identifying information, in estim_priors, restrictions and
endogenous priors) and a prior that shrinks the lags, typically toward
a random walk (in estim_var_prior). RISE offers two kinds of lag
prior, and they do not treat your prior on \(A_{0}\) the same way.
Reduced-form priors (minnesota, niw, inw,
generate_sims_zha_prior, …) are densities over the reduced form
\(B = A_{0}^{-1}[c\;A_{1} \cdots A_{L}]\) and
\(\Sigma_{u} = A_{0}^{-1}\mathrm{diag}(\sigma)^{2}A_{0}^{-\prime}\). For an
svar_model RISE evaluates them at the reduced form implied by the
structural parameters. The result is not a density over the structural
parameters \((A_{0}, A_{+}, \sigma)\), and no Jacobian can make it
one in general: the change of variables needs a one-to-one map, and
\((A_{0}, \sigma)\) has more free parameters than the
\(n(n+1)/2\) of \(\Sigma_{u}\) as soon as the SVAR is
over-parameterized relative to the reduced form (e.g. 24 against 21 in
Ahn and Rudd, 2025). The consequence is not cosmetic: integrating the
lags and variances out leaves a factor \(w(A_{0})\) that multiplies
the prior you put on \(A_{0}\). You write \(p(A_{0})\); the
model uses \(p(A_{0})\,w(A_{0})\). For the Baumeister-Hamilton
family the factor is known in closed form (Loria, 2026, Proposition 1);
in Ahn and Rudd it moves the posterior mode of \(A_{0}\) by up to
0.36.
Structural priors put the lag prior on the structural coefficients, conditional on \(A_{0}\). Writing equation \(i\) as \(a_{0,i}y_{t} = a_{+,i}x_{t} + \sigma_{i}e_{it}\),
(the second block is optional; the Gamma has shape \(\kappa_{i}\)
and rate \(\tau_{i} = \kappa_{i} a_{0,i} S a_{0,i}'\), and RISE
evaluates it as a density for the parameter \(\sigma_{i} > 0\)).
Given \(A_{0}\) this is a proper density over
\((A_{+}, \sigma)\): it integrates to one. The marginal prior of
\(A_{0}\) is therefore exactly the one you wrote, and there is
nothing to correct. They are built by
rise.engine.var.var_priors.generate_structural_prior and passed
through estim_var_prior like the reduced-form ones:
bh = rise.engine.var.var_priors.generate_structural_prior('bh', ...
endog, const, exog, nlags, db); % data: for S
mdlest = estimate(mdl, ...
data = db, ...
estim_var_prior = bh, ...
estim_priors = a0_priors, ...
estim_linear_restrictions = linres);
Two families:
'bh'– Baumeister and Hamilton (2015, 2018). Random-walk mean (\(E[A_{1} \mid A_{0}] = A_{0}\);ar_first_lagscales it,meanreplaces the whole map \(P\)), \(M_{i}\) diagonal with \(\tau^{2}/(l^{2d}S_{jj})\) for lag \(l\) of variable \(j\) and \(\tau^{2}c^{2}\) for the constant and each deterministic regressor, with \(\tau\) =tightness, \(d\) =lag_decayand \(c\) =constant_looseness(the \(\lambda_{0}\), \(\lambda_{1}\) and \(\lambda_{3}\) of Baumeister and Hamilton, the option names until 30 October 2026). \(S\) is the covariance matrix of the residuals of univariate AR(nlags) regressions computed from the data you pass (or giveSdirectly). Optionstightness(0.2),lag_decay(1),constant_looseness(100),kappa(2),use_sigma_prior(true): the defaults are Ahn and Rudd’s values.'sims_zha'– Sims and Zha (1998) in its original structural form. The dummy observations \((Y_{d}, X_{d})\) of the reduced-form Sims-Zha prior (same hyperparameters,tightness,lag_decay,constant_looseness,covariance_dummy_weight,co_persistenceandown_persistence, and conventions; nocross_tightness) enter each structural equation as prior observations \(Y_{d}a_{0,i}' = X_{d}a_{+,i}' + \sigma_{i}e\), which stays conjugate: \(M_{i}^{-1} = X_{d}'X_{d}\) (the lag and constant dummies plus the sum-of-coefficients and co-persistence dummies) and \(P = (X_{d}'X_{d})^{-1}X_{d}'Y_{d}\). The Gamma block is the rest of the same dummy likelihood. (Sims and Zha normalize \(\sigma = 1\) with a free scale of \(A_{0}\); RISE’s parameterization with \(\sigma\) free is equivalent.)
The template also returns the pieces the conditional posterior needs
(conditional_prior, conditional_posterior: \(G_{i} = X'X +
M_{i}^{-1}\), the conditional posterior mean of \(a_{+,i}\) and the
residual sum of squares).
When to use which. Use a structural prior whenever the prior on \(A_{0}\) carries the identification – sign restrictions, informative priors on impact coefficients (Baumeister-Hamilton style), endogenous priors on impulse responses – and in any over-identified or set-identified SVAR: it is the only way to get the \(A_{0}\) prior you specify. It is also the prior to use to replicate papers built on the Baumeister-Hamilton or the structural Sims-Zha prior, with no correction term. Reduced-form priors remain the natural choice when the prior is genuinely about the reduced form (forecasting, a shared reduced-form prior across identification schemes) or to reproduce results obtained with them. Even with an exactly identified \(A_{0}\) (e.g. recursive), where a Jacobian would exist, RISE does not apply one, so the reweighting is there too.
What the structural prior covers. It is the prior of the lag,
constant and deterministic coefficients, and of each \(\sigma_{i}\)
when the Gamma block is on. A prior on any of them in estim_priors
is combined with it, as for every VAR prior. The structural prior has no
marginal density of part of its block, so the product has no normalizing
constant that RISE can compute: there is then no marginal data density,
and estimate says why. (It was an error,
setup_priors:VarPriorOverlap, before 30 October 2026.) With
use_sigma_prior = false the \(\sigma_{i}\) take the priors you
give them. Priors on \(A_{0}\) are always yours. The parameters it
covers carry RISE’s default flat prior, so that they are estimated: a
start value and bounds, with no density.
Defined parameters get no default prior. A parameter that
estim_nonlinear_restrictions defines as a function of others
('a0_y_p=-h12/(1-h12*h21)', as in Baumeister-Hamilton-type
identification through \(H = A_{0}^{-1}\)) is not free, so RISE
gives it none of these flat priors and does not estimate it; for a
switching parameter this holds state by state
('a0_y_p(reg,2)=...' leaves a0_y_p_reg_1 free). The order in
which the VAR prior and the restrictions are set does not matter. (A
prior on such a parameter would make it an estimated coordinate that
its definition overwrites: a dead direction of the search and a
singular Hessian.)
Regime switching. The prior is evaluated regime by regime, given \(a_{0,i}(r)\) and \(\sigma_{i}(r)\), with two rules that keep it a proper prior over the parameters that actually exist:
One evaluation per distinct parameter. A block (the lags of one equation, or its \(\sigma_{i}\)) that does not switch is evaluated once, not once per regime. (Reduced-form priors count each value of the reduced form once too, through the closed-form marginals of the templates; see Reduced-form VAR Modeling.)
Mixed switching needs a reference regime. When a block does not switch but its conditioning set does – e.g. only \(\sigma\) switches, so the lag block is conditioned on a switching \(\sigma_{i}\) – the block is conditioned on the reference regime: option
reference_regimeof the factory, default 1 (the first state of every chain).estimateprints which blocks use it, and the full plan is inmdlest.model_data.estim_priors_data.var_prior_template.structural_plan.
Limits. svar_model only (reduced-form, panel and proxy VARs and
DSGE models raise svar_evaluator:StructuralPriorNotSvar); the
template’s variables, lags, constant and deterministic terms must match
the model’s (svar_evaluator:StructuralLayoutMismatch). With
exclusion restrictions on the lags, the Gaussian block is evaluated at
the restricted point over the full coefficient vector, as for the
reduced-form priors; it is then not the conditional density of the free
coefficients. See the tutorial Estimation/svar_structural_priors.
3.5.1. Integrating out the lags: estim_svar_integrate_lags
What it does. Given \(A_{0}\), a structural prior makes the posterior Gaussian in each equation’s lag, constant and deterministic coefficients \(a_{+,i}\) and, with the Gamma block, Gamma in \(\sigma_{i}^{-2}\). Both integrate out in closed form, equation by equation (Loria, 2026, Proposition 2):
with \(G_{i} = X'X + M_{i}^{-1}\) and \(\zeta_{i}\) the residual
sum of squares of the conditional regression of \(Y a_{0,i}'\) on
\(X\), prior term included. \(\log p(A_{0})\) is everything else
in RISE’s posterior: your priors on \(A_{0}\) (or on the parameters
\(A_{0}\) is derived from), restrictions, endogenous priors. With
estim_svar_integrate_lags = true the optimizer (estim_optimizer)
searches this marginal posterior, over those parameters only:
mdlest = estimate(mdl, ...
data = db, ...
estim_var_prior = bh, ... % 'bh' or 'sims_zha'
estim_priors = a0_priors, ...
solve_check_stability = false, ...
estim_svar_integrate_lags = true, ...
estim_svar_start = 'concentrated'); % optional, recommended
mdlest.model_data.estimation.posterior_maximization.svar_integrated
At the mode, the lags and \(\sigma\) are set to their conditional
posterior mode given \(A_{0}\) (the joint mode of
\((a_{+,i}, \sigma_{i})\), with \(\sigma_{i}^{2} = (2\tau_{i} +
\zeta_{i})/(T + k + 2\kappa_{i} + 1)\)), so the estimated model is
complete and irf, filter, forecast work as usual. The
summary svar_integrated holds the log marginal posterior at the mode
(log_marginal_posterior; the joint kernel there is the usual
log_post), the log marginal likelihood \(\log p(Y \mid A_{0})\),
the parameters searched and integrated, the Hessian of the marginal and
a Laplace marginal data density built on it (also reported as
log_marginal_data_density_laplace); it agrees with the Laplace
marginal data density of the joint route up to the error of the two
approximations. The standard errors of the
integrated coefficients combine their conditional posterior covariance
given \(A_{0}\) with the uncertainty about \(A_{0}\) (law of
total variance, to first order). With estim_svar_start =
'concentrated' the multi-start search runs on the same marginal
posterior; use it, the marginal can have local modes. The marginal can
be evaluated at any point with
rise.engine.var.vartools.svar_integrated_posterior.
Why it helps. The search runs over \(A_{0}\) alone (18
parameters instead of 318 in Ahn and Rudd). And in Baumeister-Hamilton
type models, where the identifying information is on
\(H = A_{0}^{-1}\) and each column of \(H\) carries a unit
normalization, the joint posterior over all parameters has no mode:
when a column of \(H\) grows, the matching row of \(A_{0}\)
shrinks, \(\sigma_{i}\) and the lag block shrink with it, and the
joint density maximized over \((A_{+}, \sigma)\) grows like
\(\lvert h\rvert^{k+1}\), faster than a Student-t prior on
\(h\) pushes back. The joint optimizer runs off to infinity; the
marginal posterior of \(A_{0}\), which is what Baumeister and
Hamilton (and Ahn and Rudd) work with, has a mode. With the 'bh'
structural prior and this option, such models need neither a correction
term nor a custom mode search (the comparison with Ahn and Rudd’s own
numbers is still to be run). See the tutorial
Estimation/svar_integrated_lags.
When it qualifies. Otherwise estimate stops with an error; it
never falls back silently to the joint search.
svar_modelwith constant parameters, or with regime switching driven by exogenous chains with constant transition probabilities (below). Time-varying (endogenous) transition probabilities are refused (estimate:svarIntegrateSwitching).A structural prior in
estim_var_prior(estimate:svarIntegrateNoStructuralPrior), and no other prior on the lags or on a \(\sigma\) it covers (setup_priors:StructuralPriorOverlap,estimate:svarIntegrateOverlap).No endogenous prior involving the lags or \(\sigma\), including impulse responses and moments, and no endogenous prior given as a function handle, which cannot be checked (
estimate:svarIntegrateEndogenousPriors). Endogenous priors on \(A_{0}\) parameters are fine.Linear restrictions: exclusion restrictions on the lags (and lags tied to \(A_{0}\)) are integrated exactly over the free coefficients – the closed form above with \(G_{i} = D'(X'X + M_{i}^{-1})D\) and \(\kappa_{i} + (T + k - f_{i})/2\) in place of \(\kappa_{i} + T/2\), \(f_{i}\) the number of free coefficients. Restrictions tying lags of different equations, or a lag to \(\sigma\), a fixed or restricted \(\sigma\) under the Gamma block, lags in
estim_nonlinear_restrictions, derived lags andestim_general_restrictionsare refused (estimate:svarIntegrateRestrictions).solve_check_stability = false: the stability check truncates the region of the lags that the closed form integrates over (estimate:svarIntegrateOptions, as areestim_mle,estim_eval_lik = false,estim_blocksand missing data).
Without the Gamma block (use_sigma_prior = false) only the lags
are integrated out; each \(\sigma_{i}\) is searched with
\(A_{0}\) under its own prior, and the closed form is
\(-\tfrac{T}{2}\log 2\pi - \tfrac{1}{2}\log\lvert M_{i}\rvert -
\tfrac{1}{2}\log\lvert G_{i}\rvert - T\log\sigma_{i} -
\zeta_{i}/(2\sigma_{i}^{2})\) per equation.
Under regime switching. The likelihood mixes over regime paths, so the lags and \(\sigma\) no longer integrate out in closed form. Given the regime probabilities they do: with weight \(\xi_{t}(r)\) on period \(t\) in regime \(r\), each structural equation is a weighted conjugate regression, and the closed form above holds regime by regime with \(T\) replaced by \(\sum_{t}\xi_{t}(r)\). RISE supplies the weights by EM, inside every evaluation of the search over \(A_{0}\) and the transition probabilities:
E-step: the smoothed regime probabilities (Hamilton filter and smoother, chain started at its ergodic distribution as in RISE’s likelihood), given \(A_{0}\), the transition matrix and the current distribution of the lags and \(\sigma\);
M-step: the regime-weighted conditional posterior of the lags and \(\sigma\), in closed form, equation by equation. When every switching lag block lies within one \(\sigma\) state (lags and \(\sigma\) switch together, only the lags switch, or nothing switches) it is Normal-Gamma and exact; when \(\sigma\) switches on a chain the lags do not follow (volatility regimes), the lag prior is conditioned on a reference regime’s \(\sigma\), and the M-step alternates a Gaussian factor for the lags and a Gamma factor per \(\sigma\) state.
The objective is the EM bound on the integrated posterior: exactly the
closed form with one regime or when the regimes are known, a lower bound
otherwise (it ignores the posterior dependence between the regime path
and the lags). It rises at every EM step; EM runs to convergence from a
reference regime distribution, which is reset at the mode (to the
regime distribution there, or to a fresh perturbed start at the mode
when that gives a higher objective; restarts lists the rounds where
it did) and the search repeated until a round no longer improves. A point
where EM does not converge within 5000 iterations, or where the bound falls
by more than rounding, is refused: its objective is minus infinity. The first reference comes
from estim_svar_start_trials perturbations of the switching blocks
of the conditional fit (as in the 'concentrated' start below), each
followed by a few EM iterations, the best kept. This happens whatever the
value of estim_svar_start; with 'concentrated' a multi-start over
\(A_{0}\) and the transition probabilities, on the EM objective, runs
before the optimizer as well (see “Starting values” below). At the mode the lags and
\(\sigma\) are the modes of their regime-weighted conditional
posterior; svar_integrated.route is 'em' and
svar_integrated.em holds the smoothed regime probabilities
(smoothed_regime_probabilities, T x regimes), the transition matrix,
the EM trace at the mode (trace, after every E and M half step),
iterations, converged, monotone, the search rounds and
the start report. rise.engine.var.vartools.svar_switching_integrated_posterior
evaluates the objective at any point. See the tutorial
Estimation/svar_integrated_lags_switching.
Limits. Under regime switching the objective is a bound, not the
integrated posterior itself, and its Laplace marginal data density is
not a marginal data density. Weak identification when only the lags
and constants switch: with one \(\sigma\) shared by the regimes,
the regimes differ only through the conditional mean, which a few
hundred observations pin down poorly. The objective can then have
several modes, and the highest need not be near the true regimes. In a
simulated two-variable example (400 observations, the truth
\(P(1\to2)=0.05\), \(P(2\to1)=0.1\)), EM started from the true
regime path rose to a mode classifying 87% of the periods correctly,
while every cold start (the perturbed starts above and random regime
paths) reached a mode about 10 log points higher at which one regime is
empty: every period is in the other, and the empty regime’s lags and
constants sit at their prior mode (a random walk without drift under
'bh'). That is a property of the objective on that sample, not of
the search. Part of it may be the bound itself: its gap to the
integrated posterior vanishes when the regime path is certain and grows
with the posterior uncertainty about the path, so it favors confident
regime allocations, and an empty regime is the most confident of all.
Letting \(\sigma\) switch with the lags (volatility and mean regimes
together) separated the regimes in the same design (94% correct). The
regime labels are not identified either: with symmetric priors, a mode
and its relabeled copy have the same objective, and the route may
return either. The Laplace marginal data density is an
approximation over \(A_{0}\) only (the lags and variances are
integrated exactly). Parameters that
estim_nonlinear_restrictions define get no default prior and are not
searched. An estimated parameter that still moves no model parameter
– e.g. an \(A_{0}\) entry given a prior in estim_priors although
a definition overwrites it – is reported as inert and stays at its
start value (its posterior is its prior).
3.6. Starting values: estim_svar_start
The posterior-mode search starts, by default, from the prior start
values: \(A_{0} = I\), and whatever the priors (or the VAR prior’s
defaults) say for the lag coefficients, constants and shock standard
deviations; parameters with neither a prior nor a value get the
reduced-form OLS estimates under \(A_{0} = I\). This is
estim_svar_start = 'ols_identity', the default. That point can be
far from the mode, and it need not satisfy the identifying
restrictions on \(A_{0}\).
estim_svar_start = 'concentrated' starts somewhere better. Given
\(A_{0}\), the other blocks have closed-form conditional
maximum-likelihood values, from the OLS reduced form
\((\hat{B}, \hat{c}, \hat{\Omega})\) over the estimation sample:
Substituting them leaves a posterior in \(A_{0}\) alone – with
every prior, linear and nonlinear restriction, derived parameter and
endogenous prior, since RISE evaluates it with its own posterior
kernel. RISE maximizes it over the estimated \(A_{0}\) parameters
from estim_svar_start_trials starting points (default 10): the
prior start values, then draws from the \(A_{0}\) priors that
satisfy the restrictions. The best point goes to the optimizer:
mdlest = estimate(mdl, ...
data = db, ...
estim_var_prior = var_prior, ...
estim_linear_restrictions = linres, ...
estim_svar_start = 'concentrated', ...
estim_svar_start_trials = 10);
mdlest.model_data.estimation.posterior_maximization.svar_start
The summary svar_start records the log posterior at the chosen
start and at the 'ols_identity' one, the \(A_{0}\) parameters
searched over, and the number of posterior evaluations the search
cost (not included in funevals, which counts the optimizer’s).
What it guarantees, and what it does not:
Only estimated parameters move. Parameters without a prior keep their values (yours, or the
'ols_identity'seed). Linear restrictions are imposed after the lag, constant and sigma blocks are filled in, so a restricted lag coefficient keeps its restricted value.Never worse than the default. The
'ols_identity'start is evaluated too, and kept when its posterior is higher.It is a start, not an estimate. With priors or restrictions on the lags, the conditional ML blocks are not their conditional posterior modes; the optimizer takes it from there.
Cost. The search runs over the free \(A_{0}\) entries only (a Nelder-Mead search per starting point), whatever the number of lag coefficients. When the default start reaches the mode anyway, it costs more evaluations than it saves the optimizer, and the saving does not grow with the number of lags (see “What the evidence says” below). It pays off when the default start leads to a local mode.
svar_model only. On reduced-form, panel or proxy VARs (and DSGE models)
'concentrated'is an error.With
estim_svar_integrate_lagsthe same multi-start search runs on the integrated posterior of \(A_{0}\) instead (the lags and variances integrated out rather than set to their conditional ML values);svar_start.integratedis then true.
Under regime switching the start is a heuristic. The
constant-parameter fit above is computed with every regime tied to the
same parameters, then copied to every regime; the switching blocks are
perturbed (each shock standard deviation scaled down in the low states
and up in the high states of its chain, switching coefficients by a few
percent), the transition probabilities stay at their prior start
values, and the best of estim_svar_start_trials perturbations goes
to the optimizer. In the joint search there is no EM step to pull the
regimes apart before the optimizer does (with
estim_svar_integrate_lags there is: see above). The default start can
end in a local mode far below the one this start reaches: in the evidence
below, a degenerate mode 94 log points lower, where one regime has a
collapsed variance and covers a handful of periods.
Why perturb at all: the default start gives every regime the same values, since the priors of a switching parameter are the same in each regime. With symmetric priors the posterior does not change when the regimes are relabeled, so at a point where the regimes are identical its derivative along any direction that pulls them apart is zero. A gradient-based optimizer started there has no first-order reason to separate the regimes.
With the lags integrated out under regime switching the objective is the EM bound above, and EM needs a starting distribution of the regimes: a symmetric one stays symmetric. Three steps choose and refine the start.
The start of the regime distribution (always, whatever
estim_svar_start). Given \(A_{0}\) at the start, every regime gets the conditional posterior mode of its lags and \(\sigma\) computed on all the data (the same values in regimes that share \(A_{0}\)); the switching blocks are perturbed as above,estim_svar_start_trialstimes; each perturbation is followed by up to 50 EM iterations, and the best regime distribution is kept.A multi-start over \(A_{0}\) and the transition probabilities (
'concentrated'only), on the EM objective, as for constant parameters.Restarts at the mode (always). The regime distribution is reset at the mode, or replaced by a fresh perturbed start there when that is higher, and the search is repeated until a round no longer improves (at most 10 rounds).
The perturbed starts are in svar_integrated.em.start (F, the
objective after each perturbation, best, and perturbations, the
scale factors used), the rounds in svar_integrated.em.rounds and
svar_integrated.em.restarts.
What it reports. posterior_maximization.svar_start has
method, trials and trials_run (starting points asked for, and
those that found an admissible draw), searched_a0, log_post (at
the chosen start), log_post_ols_identity (at the default start),
funevals (evaluations of the start search) and kept
('concentrated' or 'ols_identity'). In the joint search it also
has log_post_constant_fit (before the perturbations, under
switching) and perturbed_parameters; with integrated lags,
integrated (true), and log_post is the integrated objective.
What the evidence says. A Monte Carlo on simulated SVARs (RISE main of 12 October 2026; the designs of the unit tests and tutorials, plus larger ones) compared the two starts, each followed by the default optimizer, with a reference mode found by a much longer search (more starts, the truth as a start, a grid where the search is two-dimensional):
Baumeister-Hamilton-type identification (two variables, \(A_{0} = H^{-1}\), the lags integrated out; the model of the tutorial
Estimation/svar_integrated_lags): from the prior start the optimizer crossed the set where \(H\) is singular and stopped at a second mode, 8 to 11 log points below the global one, on all 30 datasets. The'concentrated'start reached the global mode on all 30. With three variables and four free entries of \(H\) both starts reached it on all 15 datasets.Recursive identification, constant parameters: both starts reached the mode on every dataset. With 3 variables and one lag,
'concentrated'began next to the mode and cut the optimizer’s evaluations by a third, but its own search made a run 2.8 times longer. With 4 variables and four lags (78 parameters) the optimizer’s saving fell to 7%, and a run took 1.8 times as long.Regime switching, lags searched: the
'concentrated'start reached the reference on all 70 datasets (volatility regimes; lags and constants switching; both), the default start on 69. In the one miss (lags, constants and \(\sigma\) switching) the default start stopped 94 log points lower, at a degenerate mode where one regime has a collapsed variance and covers a handful of periods. Here the start search is cheap (4 to 5 seconds), and a run takes 1.1 to 1.6 times as long.Regime switching, lags integrated out (EM): the perturbed start of the regime distribution and the restarts, which always run, did the work. The default start reached the reference on 27 of 28 datasets, the
'concentrated'start on all 28, but a run took 9 to 13 times as long, since every evaluation of its multi-start runs EM. When only the lags and constants switch, the regimes were classified poorly from either start (about 73% of the periods on average), although EM started from the true regime path classified 87%: that path’s mode has a lower objective (see the limits above). In the one dataset where the default start missed the reference, by 3 log points, its mode classified the regimes better (93% against 73%).
When to use it. Use 'concentrated' when the posterior may have
several modes: Baumeister-Hamilton-type and other models identified through
\(H = A_{0}^{-1}\) or by priors, and switching models with the lags
searched. In exactly identified constant-parameter models it finds the same
mode at a higher cost. With the lags integrated out under switching, the
default already perturbs the regime distribution and restarts at the mode;
'concentrated' adds a multi-start over \(A_{0}\) and the transition
probabilities whose every evaluation runs EM, which is slow.
3.7. Impulse responses, decompositions, forecasting
Because the model is already structural, no identification
function is needed: the shock names are simply the structural
shocks (one per endogenous variable, by RISE’s naming convention),
and irf / variance_decomposition /
historical_decomposition / forecast are called directly:
myirfs = irf(mdlest); % all shocks, default horizon
myirfs = irf(mdlest, shock_names, 40);
vd = variance_decomposition(mdlest);
hd = historical_decomposition(mdlest);
fkst = forecast(mdlest, ...
simul_historical_data = db, ...
simul_history_end_date = date2serial('2003Q1') - 1);
forecast takes name-value pairs: the data in
simul_historical_data, the last date of history in
simul_history_end_date (the forecast above starts in 2003Q1, the
period after 2002Q4) and, when the default of 12 steps is not wanted,
the number of steps in simul_periods.
For plotting (quick_irfs, plot_fanchart, plot_decomp,
…), parameter uncertainty via bootstrap, Bayesian posterior
sampling, fan charts of the decompositions and IRFs, and
conditional forecasting, see Reduced-form VAR Modeling – the calls
are identical, with a0 / a1 / … parameters in place of
the reduced-form b1 / b2 / … ones, and without the
extra Rfunc (identification) argument.
3.8. Adding regime switching
Pass a Markov-chain structure to the factory and list the
parameters it controls – for an SVAR these are typically a0
(switching contemporaneous transmission) and/or a1, …,
ap:
mc = struct();
mc.name = 'policy';
mc.number_of_states = 2;
mc.controlled_parameters = {'a0(R,:)'};
mc.endogenous_probabilities = [];
mc.probability_parameters = [];
mdl = svar_model(endog, ...
lag_length = nlags, ...
constant_term = const, ...
deterministic_vars = exog, ...
markov_chains = mc);
Time-varying transition probabilities are specified exactly as in
Reduced-form VAR Modeling (an endogenous_probabilities
definition plus the probability_parameters that enter it),
and the switching parameters are given priors through
estim_priors.
Proxy / instrumental SVARs are handled by the related Proxy (instrumental) SVAR Modeling object, and panels of (structural) VARs by the Panel VAR Modeling object.