Problem with colinear variable


I have tried to build moodel based on a few equations from another model in which I have added
some others. When I try to run the model I get some error messages form Dynare, and
it seems like that the problem is that there is some kind of problem with a colinear variable - in this
case “e” which is the nominel exchange rate.

When running the model I get the following message:

dynare NK_GM05_HJ.mod

Configuring Dynare …
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.

Using 64-bit preprocessor
Starting Dynare (version 4.5.4).
Starting preprocessing of the model file …
Found 17 equation(s).
Evaluating expressions…done
Computing static model derivatives:

  • order 1
    Computing dynamic model derivatives:
  • order 1
  • order 2
    Processing outputs …
    Preprocessing completed.

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
10 11 12 15
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.
Error using print_info (line 54)
One of the eigenvalues is close to 0/0 (the absolute value of numerator and denominator is smaller than 1e-06!
If you believe that the model has a unique solution you can try to reduce the value of qz_zero_threshold.
Error in stoch_simul (line 100)
print_info(info, options_.noprint, options_);
Error in NK_GM05_HJ (line 261)
info = stoch_simul(var_list_);
Error in dynare (line 223)
evalin(‘base’,fname) ;

I have tried a lot of things in order to deal with the problem without any success yet. I thought that someone in this forum might be able to spot what the problem is and how I can deal with it.
I have attached the modfile: NK_GM05_HJ.mod (5.6 KB)

I hope that you are able to help me.


Dear Mburr,

There are actually two problems with your mod file.

The first one is a colinearity issue, as detected by Dynare, between equations 10, 11, 12, 15, i.e.:

y = (1-gamma)*c + gamma*cstar + gamma*(2 - gamma - gammastar)*eta*s;
yf = gammastar*c + (1-gammastar)*cstar - gammastar*(2 - gamma - gammastar)*eta*s;
(1 - gamma - gammastar)*s = sigma*( c - cstar);
biggamma*s = sigma*( y - yf);

You can easily verify that, for the values you have given to your parameters, the last of these four equations can be deduced from the three others. A possible solution is to change one or several parameter(s) (for example set gamma to 0.35), though I don’t know if this is consistent with your economic problem.

The second issue has to do with endogenous variable e. This variable only appears in the model under its first difference form (e-e(-1)). Consequently, Dynare is unable to compute the steady state for e; it can only compute the steady state of its first difference. The solution is simply to replace e-e(-1) by a new variable, called for example delta_e, directly representing the first difference of e.


Thanks a lot! It solved my problem.

You need to be careful. The original mod-file you use from the macro model database does not handle parameter dependence correctly. Thus, you cannot simply change some of the parameters. They are actually composites. See

Thanks, Pfeifer. That is duly noted!

Another thing: Does anyone know why I cannot print the IRF of “s”??

If s does not show up, it means that the size of the IRF is smaller than irf_plot_threshold (see the manual)

What do you mean with “redundancy”?