When I try to run the attached code in Dynare I get the following message: “??? Error using ==> lnsrch1 at 71
Some element of Newton direction isn’t finite. Jacobian maybe singular or there is a problem with initial values”. Can anybody help me with that, please?
Also, on a related note, suppose that my model has an infinity of steady states (I guess this is the case). If I provide a possible steady state, can Dynare compute the IRFs from there, or it has to be a unique steady state? (given the steady state I guess the path following a shock is unique)
twoSAV.mod (4.93 KB)
Use the current unstable version (to be released as Dynare 4.5) with
and you will find a steady state.
Dynare accepts any steady state that you provide. It does not have to be unique.
It worked, thank you very much for the help!
So, I have a different version of the previous code with a minor change: the variable “phi” is defined as in the equation in line 166, instead of the one in line 164. The steady state value of “phi” should remain the same, which is zero.
However, when I try to run this code I get the message: “Impossible to find the steady state. Either the model doesn’t have a steady state, there are an infinity of steady states, or the guess values are too far from the solution”, even with the unstable version. Do you know what might be the problem?
(attached is the version with the minor change from the previous one)
twoSAVk100.mod (4.95 KB)
With phi=0, you have in steady state
which is different so that it does not add up.
Did it work for you? I don’t think this is the problem. I changed the value for RkmR_ss to the value you provided, and it still doesn’t work, even though the value that Dynare calculates for “psi” in the steady-state is zero when it crashes. I get the same message: “Impossible to find the steady state. Either …”
I checked the values provided by “resid(1)” and I guess the problem is with the variables CK, CW, BK and BW. The thing is, I do have a infinity of steady states in this model. “C” and “B” can be divided in any way between CK and CW, and BK and BW, respectively (C = sigma*CK + (1-sigma)CW, and B = sigmaBK + (1-sigma)*BW). But I provide values for this variables because I have a specific steady-state in mind.
Do you have a clue on what the problem might be?
Thanks again for the reply.
P.S.: I wrote before that I changed the definition for “phi”, what I meant was “psi” (psi = kappa*(Rk(+1)-R-RkmR_ss)), sorry. Attached is the code with the values you provided for Rk, R and RkmR_ss.
twoSAVk100.mod (5.02 KB)
My point is that when you have infinitely many steady states, you need to provide Dynare with a correct steady state. You do not do this with your added equation. As I outlined in my previous post, there is a small difference in values that throws Dynare off. When you tweak one parameter (RkmR_ss in the last file) it might happen that other equations do not match.
I didn’t know that such small differences would be problematic. Thanks again, all revise my values and be more precise!
Dynare’s default tolerance is 10e-6 if I remember correctly. Anything above that is not a steady state.
Wow! When Dynare said “guess values too far from the solution” I thought it would mean, in the worst case, something like 10e-3…
When there is a unique solution, the derivatives will provide information on how to find the steady state. In your case with a multiplicity of steady states, the derivatives in some direction will be 0. Even small differences can provide insurmountable obstacles for Newton-type solvers.