Interface for SVAR exculsion restrictions
Model
![\[
y_t' A_0 = \sum_{i=1}^r y_{t-i} A_i + z_t' C + \epsilon_t
\] \[
y_t' A_0 = \sum_{i=1}^r y_{t-i} A_i + z_t' C + \epsilon_t
\]](/DynareWiki/SvarExclusionInterface?action=AttachFile&do=get&target=latex_f51c6ddc83cc4bdb5550002505f68bd54e00aeff_p1.png)
where yt is a vector of n endogenous variables, r is the maximum lag length, z a vector of m exogenous variables (only a constant for the time being).
Note that each equation corresponds to the columns of Ai, i=0,...,r.
The model can be written in a more compact form
![\[
y_t' A_0 = x_t A_+ + \epsilon_t
\] \[
y_t' A_0 = x_t A_+ + \epsilon_t
\]](/DynareWiki/SvarExclusionInterface?action=AttachFile&do=get&target=latex_1f948ac5a6e51de98e8f674f47b2e869cebbac4e_p1.png)
where
![\[
x_t = \left[\begin{array}{cccc}y_{t-1}' & \ldots & y_{t-r}' & z_t'\end{array}\right]\;\;\;
A_+ = \left[\begin{array}{c}A_1\\ \vdots \\ A_t\\ C\end{array}\right]
\] \[
x_t = \left[\begin{array}{cccc}y_{t-1}' & \ldots & y_{t-r}' & z_t'\end{array}\right]\;\;\;
A_+ = \left[\begin{array}{c}A_1\\ \vdots \\ A_t\\ C\end{array}\right]
\]](/DynareWiki/SvarExclusionInterface?action=AttachFile&do=get&target=latex_1f867d73de1f1e146217f5a86ed01f6684938e5e_p1.png)
Exculsion Restrictions
Restricitions are defined with Qi and Ri matrices for each column of A0 and A+ respectively.
Q and R matrices are made of 0 and 1 such that
![\[
Q_i A_{0,i} = 0\;\;\;R_i A_{+,i} = 0
\] \[
Q_i A_{0,i} = 0\;\;\;R_i A_{+,i} = 0
\]](/DynareWiki/SvarExclusionInterface?action=AttachFile&do=get&target=latex_6e8d7014565eb744c5d7bfcce9f6399e1e9af92a_p1.png)
Qi matrices have n columns and as many rows as there are restrictions.
Ri matrices have k=r*n+m columns and as many rows as there are restrictions.
Dynare implementation
The Qi and Ri matrices are stored in 3-dimensional arrays: Qi' and Ri'
Qi = zeros(n,n,n); Ri = zeros(k,k,n);
For each exculsion of variable yt,j in equation i
Qi(h,j,i) = 1;
where h is the number of the restriction in equation i in A0
For each exculsion of variable yt-p,j in equation i
Ri(h,(p-2)*n+j,i) = 1;
where h is the number of the restriction in equation i in A+
The above should be implemented in the preprocessor that should create options_.ms.Qi and options_.ms.Ri [these names may collide with restriction on Markov processes. We will need to check later]
In Matlab, we need a function swz/identification/exclusions.m, similar of swz/identification/upper_choleski.m that is called when exclusions are specified instead of upper_choleski or lower_choleski
The only code needed in this function is
%make local copy in order not to call structure fields inside a loop Qi = options_.ms.Qi; Ri = options_.ms.Ri; for n=1:nvar Ui(n) = null(Qi(:,:,n)); Vi(n) = null(Ri(:,:,n)); n0(n) = size(Ui(n),2); np(n) = size(Vi(n),2); end
ixmCoPres = NaN; }}}
It is also necessary to write swz/identification/lower_choleski.m