Warnings

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Warnings

Postby andre » Wed Feb 17, 2016 7:32 pm

I have a model that works well for some parameters. However, I frequently receive the following Warnings for some parameter changes:

-> Warning 1: "Warning: Matrix is close to singular or badly scaled. Results may be inaccurate." RCOND = 3.246774e-18.

It is a deterministic model with simul(periods=3000,maxit=30);

I receive the Warning above repeatedly. The RCOND continues to fall until 2.295887e-41. After this point, the warning changes to

-> Warning 2: "Warning: Matrix is singular to working precision."

I can usually circumvent these warnings with different guesses for the steady state and changing the way in which the model equations are written. However, there is a parameter that I need to increase, but that I could not find a solution. I also want to write the equations of the model in a more robust way.

My questions are:

1. In which moment of the Dynare processing I receive the warnings above. Is it because Dynare cannot find the transition path, at the simul() command?

2. If I use "exp(x)" instead of "x" for the endogenous variables, will it smooth the equations in a way that I do not receive these Warnings?

3. If I linearize the more complex equations of the model, will it solve the problem?

Thank you!
andre
 
Posts: 3
Joined: Sat Jun 06, 2015 4:47 pm

Re: Warnings

Postby jpfeifer » Sat Feb 20, 2016 8:02 am

1. Think about the exercise as finding the root of a nonlinear equation. In a Newton type solver you need to invert matrices. If the matrix is close to singular, the warning will pop up.
2. That can be, but is not a general property. In some cases using a log transformation will make the problem more well-behaved in others it makes it worse.
3. Yes, it will. Solving a linear system of equations is straightforward. But when doing so you incur an approximation error. This the cost of replacing a nonlinear problem with a linear one.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Warnings

Postby andre » Mon Feb 22, 2016 5:47 pm

That's great, thank you for your reply. I will implement the steps above, then. It seems that this is the right direction. Is RCOND the determinant of the matrix to be inverted?

jpfeifer wrote:1. Think about the exercise as finding the root of a nonlinear equation. In a Newton type solver you need to invert matrices. If the matrix is close to singular, the warning will pop up.
2. That can be, but is not a general property. In some cases using a log transformation will make the problem more well-behaved in others it makes it worse.
3. Yes, it will. Solving a linear system of equations is straightforward. But when doing so you incur an approximation error. This the cost of replacing a nonlinear problem with a linear one.
andre
 
Posts: 3
Joined: Sat Jun 06, 2015 4:47 pm

Re: Warnings

Postby jpfeifer » Mon Feb 22, 2016 6:39 pm

It's the reciprocal condition number of the matrix to be inverted. See http://de.mathworks.com/help/matlab/ref/rcond.html?refresh=true
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Warnings

Postby andre » Thu Feb 25, 2016 9:50 am

Thank you. It is a good explanation about the rcond function and the reciprocal conditional number in MatLab. Thanks
andre
 
Posts: 3
Joined: Sat Jun 06, 2015 4:47 pm


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 15 guests