MS-SBVAR A0-A+ cross restrictions

Dear all,

Can anyone help me in finding a way to impose A0- A+ cross-restrictions inside the ‘ms_bvar’ dynare codes?
More in detail, I need to impose a restriction applied to the second equation of my VAR with 4 variables, which involves a linear combination of 3 coefficients, one inside the A0 and two inside the A+ (all in the same equation):


which in terms of dynare codes should be:
‘restriction equation 2, coeff(x,0)-coeff(x,1)-coeff(x,2)=0;’

However, Dynare gives me an error message saying 'SVAR_IDENTIFICATION: a single restrictions must affect either Qi or Ri, but not both

Reading the dynare options, I understand that the ‘cross_restrictions’ option inside the ‘ms_estimation’ code should allow this kind of restriction, but it continues to give me the same error.

Does anyone know, firstly, whether this kind of restriction is implementable inside these codes and, secondly, how to apply it?


Could you please provide me with the full codes?

Yes. This is the code:
SVEC.mod (1.55 KB)

Dear Johannes,

did you find a way to go through the problem, looking at the codes?


Dear Valeria,
I have contacted the responsible person and wait for feedback.

Hi, this is currently not possible. You can track the status of your request at

Many thanks for transmitting my request.
If I got it well, to extend the identification to my case it’s necessary to build manually the Wj matrices, as we already build Uj (from Qj) and Vj (from Rj). Since they are created inside the C codes according to the specification chosen, producing them should require to work inside C or matlab?
Best Regards,


You could be able to do it by building manually Ui, Vi, and Wi matrices outside of Dynare. To do so, run once your *.mod file and stop it before it starts the estimation. Then, modify the file init_<name_of_your_file>.dat, and modify Ui, Vi, and Wi matrices with those you wanted (obtained outside of Dynare). Then, run directly the MEX file that Dynare uses to estimate your new model (see ms_estimation.m). Like that, Dynare will not recreate a new init_<name_of_your_file>.dat file and it will use the one you just modified.

Hi there,
I have two question about the MS_SBVAR.
The first one, what will be the difference if i use:

  1. svar(…) > ms_estimation(…) > ms_compute_probabilities and mdd

  2. sbvar(…)

For both functions we can define ‘sz’ priors and inital date and other specifications. And they both give me estimated A0 and A+.

The second one, is the estimation MLE?

  1. The first syntax is a modularized version, allowing for several of the sub-commands in one mod-file.
  2. No, as the name says, the estimation will be Bayesian.

Thanks for the clarification.
Best Regards,
Faruk Akbal