Efficient quantity


by this warning “Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 5.005722e-65.”, the result of variance decomposition does not report.
what is the problem ?


As Johannes said, you probably have a stochastic singularity issue, which needs to be solved. You do not give a lot of details but I assume that the problem is related to the covariance matrix of the forecast errors. Did you try to estimate the model with less observed variables, as Johannes suggested? You can also do this the other way, starting with one observed variable and adding one by one new observed variables.

The stochastic singularity may have data and /or theoretical roots. You can check that you are not doing something stupid by simulating the model (with stoch_simul , order=1, and a large value for the periods option) and then compute the covariance of the simulated observed variables. If this matrix is not full rank, then it means that your model says that at least one linear combination of the observed variables has zero variance. The number of such linear combinations is the number of zero eigenvalues in this covariance matrix. If you look at the associated eigenvector you will be able to identify the culprit(s) (the eigenvector associated to a zero eigenvalue defines the linear combination of variables with zero variance).

You can also check that there is no similar obvious problem with the data themselves, by doing the same exercise on the ``true’’ observed data.

You can also do the same eigenvalue/eigenvector analysis on the covariance matrix of the forecast errors, but you would have to hack the Dynare codes.



Dear Stepan
tank you for your time
I do all the suggestion by Johannes, and solved all the problem
the only problem remained for me is the "Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 5.005722e-65. " .
also the variance decomposition does not report.
Best goli


But this message suggest that you did not fix the singularity issue… Or that you have another singularity elsewhere. Can you post the entire error message?



As before, provide me with the files required to replicate the issue.


Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 5.005722e-65.

tank a lot


Dear professor
I sent the files on your email because the file must be secret
tanks a lot


This (warning) message is not complete. I would need all the message displayed in the Matlab command window (with the lines referring to where the problem occurs).



I cannot even run your model due to the Blanchard-Kahn conditions not being satisfied. This seems to be due to Ricardian equivalence as bonds and lump-sum taxes are perfect substitutes. I get

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
Columns 1 through 19
1 2 3 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Columns 20 through 21
21 23

You can only have one of the two in there in the current setup.


Dear professor
tanks a lot for your time
when I remove t or bo from my model, i see “Blanchard Kahn conditions are not satisfied: no stable equilibrium”,


You need to find out why your model does not run. How did you even get the error message you posted above when you either have indeterminacy or no stable equilibrium?


dear professor
what can i do? how to do?


Sorry, but it seems you are in this way over your head and don’t have the proper training to succeed. We at the Dynare team can provide Dynare advice, but not general modeling and debugging help. We are now 51 posts into this discussion and your model still does not properly run. Don’t you have an adviser who can help you?


Dear professor
in this way i do not have adviser that can to help me, by this reason I need to your suggestion for solve the problem.
my time is very limited and I can not pay the money to the university.
i appreciated your reply and professor Stepan
tanks a lot if you help me


Unfortunately, you are not the one whose

This forum is no substitute for a proper training. If the BK conditions are not satisfied, there is still a problem with your model, most probably a timing error. You need to find it. You, as the model builder, are the only one who knows how the correct model looks like.


Dear professor and tanks a lot Dyanre team
after reading the “A Guide to Specifying Observation Equations for the Estimation of DSGE Models” and changing my code for a best estimation, i found this Warning

please help me
i will appreciated


Does this warning occur once or for all parameter draws? If it only happens sometimes, you can ignore it.


Dear professor
it’s occur for all parameters, it’s occur more the once


Dear professor
when I changed some of parameters, I get this erorr" Error using schur
Input to SCHUR must not contain NaN or Inf."
what is the problem?
tanks a lot


Dear professor
if you help me and remove this error"rror using schur
Input to SCHUR must not contain NaN or In ", I will be appreciated.