%% Normal Conjugate Prior Model for Coefficients
% Consider the 3-D VAR(4) model in docid:econ_ug.mw_e27fdd84-2be8-45ad-ac37-9822b3f3d9ab. Assume these prior distributions, as presented in docid:econ_ug.mw_411323db-bd16-46bf-8f9b-f9b0c1e7c31e:
% {\rm vec}(\left[\Phi_1,...,\Phi_4,c\right]^\prime)\vert\Sigma \sim N_{39}\left(\mu,V\right). \mu is a 39-by-1 vector of prior coefficient means (the model has 39 individual coefficients), and V is a 39-by-39 prior coefficient covariance matrix.
% The innovations covariance \Sigma is a fixed matrix.
% Suppose econometric theory dictates that
% \Sigma = \left[ {\begin{array}{*{20}{c}}
% {{{10}^{ - 5}}}&0&{{{10}^{ - 4}}}\\
% 0&{0.1}&{ - 0.2}\\
% {{{10}^{ - 4}}}&{ - 0.2}&{1.6}
% \end{array}} \right].
% Create a normal conjugate prior model for the VAR model coefficients. Specify the value of \Sigma by using the 'Sigma' name-value pair argument.

numseries = 3;
numlags = 4;
Sigma = [10e-5 0 10e-4; 0 0.1 -0.2; 10e-4 -0.2 1.6];
PriorMdl = bayesvarm(numseries,numlags,'ModelType','normal',...
    'Sigma',Sigma)

% PriorMdl is a normalbvarm Bayesian VAR model object representing the prior distribution of the coefficients. Because \Sigma is fixed for normalbvarm prior models, PriorMdl.Sigma and PriorMdl.Covariance are equal.

PriorMdl.Sigma
PriorMdl.Covariance

% Copyright 2019 The MathWorks, Inc.
%