Initial values

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.

Initial values

Postby Econ » Fri Oct 17, 2014 7:45 am

Hi,
I am having trouble choosing the right initial values. I get the error message :
"
Some element of Newton direction isn't finite. Jacobian maybe singular or there is a problem with initial values
Error in model_diagnostics (line 65)
[dr.ys,params,check1]=evaluate_steady_state(oo.steady_state,M,options,oo,1); "
What I have done is that for some variables I chose the initial values equal to the steady state and for others I chose equal to log of steady state to avoid negative results.
Is there anyway I can fix this ?
Thank you in advance for your suggestions
Attachments
mymodel.mod
(7.06 KiB) Downloaded 99 times
Econ
 
Posts: 16
Joined: Thu Aug 21, 2014 4:57 am

Re: Initial values

Postby stsp » Fri Oct 17, 2014 2:38 pm

I had a quick look at your file, and I get the impression you mix up which variables are in logs and which ones are not. In your model all variables are in logs, but your steady state variables don't seem to be in logs. So I think you should put a log in all your initial values.

For example in your model file you use: exp(Cif) whenever you use Cif, but your steady state value for Cif is kif_ss^Epsilon, which doesnt seem to be inl logs. If that is indeed true, then the initial value for Cif should be Cif = log(kif_ss^Epsilon)).
stsp
 
Posts: 11
Joined: Wed Sep 24, 2014 8:00 am

Re: Initial values

Postby Econ » Fri Oct 17, 2014 4:57 pm

Thank you for your suggestion. I corrected that but I still a have the same problem.
any more suggestions?
I attached the updated file.
Thank you
Attachments
mymodel.mod
(7.16 KiB) Downloaded 86 times
Econ
 
Posts: 16
Joined: Thu Aug 21, 2014 4:57 am

Re: Initial values

Postby jpfeifer » Fri Oct 17, 2014 6:47 pm

If your initial values are supposed to be the true steady state values, either your computations or the model equations are wrong.
------------
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: Initial values

Postby stsp » Fri Oct 17, 2014 7:07 pm

You should check the residuals of the equations, for the given initial values. That will tell you which equations is wrong (or which s.s. is wrong).

By the way, if you write the model in logs, like you did, then you should realize log(a*x^y) = log(a)+y*log(x) so you can get rid of a lot of your 'exp' expressions. Makes it more easy to read your code.

My advice to you is to actually start with a smaller model, because it seems you have hardly any experience with this. Therefore it seems wise to first get some experience with what you are doing....
stsp
 
Posts: 11
Joined: Wed Sep 24, 2014 8:00 am

Re: Initial values

Postby Econ » Fri Oct 17, 2014 7:22 pm

thank you for your help
Econ
 
Posts: 16
Joined: Thu Aug 21, 2014 4:57 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 12 guests