# Interface for SVAR exclusion restrictions

## Model

latex error! exitcode was 2 (signal 0), transscript follows: [Thu Sep 09 16:08:18.780845 2021] [wsgi:error] [pid 3436:tid 139902251431680] [client 192.168.1.1:60334] failed to exec() latex, referer: https://archives.dynare.org/DynareWiki/MarkovSwitchingInterface

where *y*_{t} 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 *A*_{i}, *i*=0,...,*r*.

The model can be written in a more compact form

latex error! exitcode was 2 (signal 0), transscript follows: [Thu Sep 09 16:08:18.839417 2021] [wsgi:error] [pid 3437:tid 139902251431680] [client 192.168.1.1:60334] failed to exec() latex, referer: https://archives.dynare.org/DynareWiki/MarkovSwitchingInterface

where

latex error! exitcode was 2 (signal 0), transscript follows: [Thu Sep 09 16:08:18.891294 2021] [wsgi:error] [pid 3438:tid 139902251431680] [client 192.168.1.1:60334] failed to exec() latex, referer: https://archives.dynare.org/DynareWiki/MarkovSwitchingInterface

## Exculsion Restrictions

Restrictions are defined with *Q*_{i} and *R*_{i} matrices for each column of *A*_{0} and *A*_{+} respectively.

*Q* and *R* matrices are made of 0 and 1 such that

latex error! exitcode was 2 (signal 0), transscript follows: [Thu Sep 09 16:08:18.947554 2021] [wsgi:error] [pid 3439:tid 139902251431680] [client 192.168.1.1:60334] failed to exec() latex, referer: https://archives.dynare.org/DynareWiki/MarkovSwitchingInterface

*Q*_{i} matrices have *n* columns and as many rows as there are restrictions.

*R*_{i} matrices have *k=r*n+1* columns and as many rows as there are restrictions.

## Dynare implementation

The *Q*_{i} and *R*_{i} matrices are stored in 2 cell arrays, with as many elements as equations:

Qi = cell(n); Ri = cell(n);

Each element of the cell arrays is a matrix with as many rows as there are restrictions on the equation and as many columns as there are coefficients in *A*_{0} and *A*_{+} respectively.

For each exclusion of variable *y*_{t,j} in equation *i*

Qi{i}(h,j) = 1;

where *h* is the number of the restriction in equation *i* in *A*_{0}

For each exclusion of variable *y*_{t-p,j} in equation *i*

Ri{i}(h,(p-1)*n+j) = 1;

where *h* is the number of the restriction in equation *i* in *A*_{+}

For general linear restrictions on the coefficients, the non-zero elements of the matrices in `Qi` and `Ri` are not necessarily equal to 1.

Excluding the constant in equation *i* requires setting

Ri{i}(h,r*n+1) = 1;

The preprocessor creates `options_.ms.Qi` and `options_.ms.Ri`

The Matlab function `swz/identification/exclusions.m` handles these options, except when `upper_cholesky` or `lower_cholesky` are specified. It contains the following code:

%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; }}}

and makes sure that the matrices have the right dimensions.