Warnings when setting "mode_compute=5"

Dear Jpfeifer,

I estimate a DSGE model with news shocks, when I set “mode_compute=5”, During the estimation, Dynare shows:

Check whether your model in truly linear
lambda = -2.3231e-08; f = 1000.1257788
STEADY: numerical initial values or parameters incompatible with the following equations
Columns 1 through 16

 1     2     3     4     5     6     8     9    10    11    12    13    14    17    18    19

Columns 17 through 32

20    21    22    26    27    28    29    30    31    32    33    34    35    36    37    39

Column 33



Warning: Matrix is singular to working precision.

In mr_hessian at 212
In newrat at 175
In dynare_estimation_1 at 337
In dynare_estimation at 89
In code at 1963
In dynare at 180
Warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND
= NaN.
In mr_hessian at 219
In newrat at 175
In dynare_estimation_1 at 337
In dynare_estimation at 89
In code at 1963
In dynare at 180

What does the problem mean? Although these messages exist, the estimation can complete and the convergence does well too. Can I trust the result?

Here attached the code and data file.
data100.xls (39.5 KB)
code.mod (11.7 KB)

You run model_diagnostics before estimation. This enable the debugging mode and you will get a whole bunch of warnings whenever something is somewhat problematic. What the mode-finder does is repeatedly try different sets of parameters in a systematic way to get to the mode. Some of the tried parameter sets will result in problems with the model. That is when you get those warnings. However, the solver internally should know how to deal with these problematic draws and filter them out. Some warnings along the way are expected and normal. Unless the solver stops prematurely or crashes or does always spit out warnings like this, you should be fine.

The particular warning you get here comes from a temporary singularity problem that leads to NaN parameters that then wrongly trigger the linearity warning.

In order to speed up the mode-finding, you should set

after model_diagnostics.

Dear Jpfeifer,

Thanks for your answer. I will try to add the command after model_diagnosis. Do you mean that all those warnings are due to the mode-finder work and my results are reliable?


As always, it is impossible to tell for sure. I would never vouch for someone else’s results being reliable (I am not even a 100% sure for my own results, because there are a myriad ways things can go wrong you never dreamed about). The best you can do is check your results if anything is suspicious and check for consistency wherever possible. But the few scattered warnings during mode-finding do not raise any red flags for me.