Error: The generalized Schur (QZ) decomposition failed

I am trying to replicate the article: “A Small New Keynesian Model of the New Zealand Economy”. However, I run into the error below. Could someone help me understand the problem.

nz.pdf (406.8 KB)

Starting Dynare (version 5.1).
Calling Dynare with arguments: none
Starting preprocessing of the model file …
Found 14 equation(s).
Evaluating expressions…done
Computing static model derivatives (order 1).
Computing dynamic model derivatives (order 2).
Processing outputs …
Preprocessing completed.


y 0
q 0
r 0
pi 0
pi_F 0
r_s 0
y_s 0
psi 0
s 0
c 0
mc 0
pi_H 0
a 0
pi_s 0
error: The generalized Schur (QZ) decomposition failed. For more information, see the documentation for Lapack function dgges: i
nfo=30, n=14. You can also run model_diagnostics to get more information on what may cause this problem.
error: called from
print_info at line 32 column 5
check at line 48 column 5
driver at line 342 column 15
dynare at line 281 column 5

When I remove the +1 from pi_s(+1) I get IRF results, however, it says that r_s and pi_s are collinear. I don’t understand, I entered the codes all right and the values also from the paper, but the results don’t come out as they should.

MODEL_DIAGNOSTICS: The Jacobian of the static model is singular
MODEL_DIAGNOSTICS: there is 1 colinear relationships between the variables and the equations
Colinear variables:
Colinear equations
3 8 14
MODEL_DIAGNOSTICS: The singularity seems to be (partly) caused by the presence of a unit root
MODEL_DIAGNOSTICS: as the absolute value of one eigenvalue is in the range of ±1e-6 to 1.
MODEL_DIAGNOSTICS: If the model is actually supposed to feature unit root behavior, such a warning is expected,
MODEL_DIAGNOSTICS: but you should nevertheless check whether there is an additional singularity problem.
MODEL_DIAGNOSTICS: The presence of a singularity problem typically indicates that there is one
MODEL_DIAGNOSTICS: redundant equation entered in the model block, while another non-redundant equation
MODEL_DIAGNOSTICS: is missing. The problem often derives from Walras Law.

Model.mod (4.5 KB)

As indicated at

in your model the foreign real interest always appears as

r_s - pi_s(+1)

There is no way to disentangle the two components. You could just define r_s_real instead and formulate

r_s - pi_s(+1)= rho_r_s*(r_s(-1) - pi_s) + v_r_s;                  


r_s_real= rho_r_s*(r_s_real(-1)) + v_r_s;                  

That will solve the collinearity. But because you will replace two variables by one without dropping another, it shows that you are still including one redundant equation. Alternatively, there is a larger problem with your setup.

Do you have any other help you could give me so I don’t lose all the work that went into building this code. Most of the works I try to replicate always have some problem.

Hi, Alvaro.
I’m kind of begginer in dynare but I think I can help you with some things in general. Obviously I can make some mistake. So, please take my advices carefully and always double check with the specialists.

  1. You should start with some seminal papers that explains all the fundamentals. In this literature, I would recommend you Gali & Monacelli (2005).

  2. Have you checked the professor Pfeifer’s website? There are many models there (including Gali & Monacelli).
    GitHub - JohannesPfeifer/DSGE_mod: A collection of Dynare models

  3. Always double-check your code. You have pi_H(+1) in the equation of pi_F, which I believe, should be pi_F(+1). In the y_s equation, you forgot the (-1) (should be an AR(1) process, right?)

  4. Your model still have an issue after the ones in 3) and correcting your code as professor Pfeifer told you. There are more equations then variables. If you aren’t used to these model, is always a good idea to read similar papers that may give you some idea what is wrong.
    This paper is very similar to Justiniano and Preston (as he says in the introduction), In Justiniano and preston they put all the equations in the model. Another one (even more similar) is Kam “Uncovering the Hit List for Small Inflation Targeters”.

1 Like