%% Specify High Lag Coefficient Tightness and Response Names
% In the 3-D VAR(4) model of docid:econ_ug#mw_22b40c74-722c-4ed0-bd9d-6de2110b22c7, consider excluding lags 2 and 3 from the model.
% You cannot exclude coefficient matrices from models, but you can specify high prior tightness on zero for coefficients that you want to exclude.
% Create a conjugate prior model for the 3-D VAR(4) model parameters. Specify response variable names.
% By default, AR coefficient prior means are zero.  Specify high tightness values for lags 2 and 3 by setting their prior variances to 1e-6. Leave all other coefficient tightness values at their defaults:
% 1 for AR coefficient variances
% 1e3 for constant vector variances
% 0 for all coefficient covariances
% Also, for conjugate Bayesian VAR models only, MATLAB® assumes that coefficient variances are proportional across response equations.  Therefore, specify variances relative to the first equation.

numseries = 3;
numlags = 4;
seriesnames = ["INFL"; "UNRATE"; "FEDFUNDS"];
vPhi1 = ones(1,numseries);
vPhi2 = 1e-6*ones(1,numseries);
vPhi3 = 1e-6*ones(1,numseries);
vPhi4 = ones(1,numseries);
vc = 1e3;
V = diag([vPhi1 vPhi2 vPhi3 vPhi4 vc]);
PriorMdl = conjugatebvarm(numseries,numlags,'SeriesNames',seriesnames,...
    'V',V)

% Copyright 2020 The MathWorks, Inc.