Problem with 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.

Problem with Initial values

Postby Nrodriguez » Mon Mar 07, 2011 3:28 pm

Hi. I'm trying to replicate a basic model with price rigidities a-la Calvo. Attached is the .mod file. When I run this one, the error that Dynare shows me is this:

??? Error using ==> lnsrch1 at 53
Some element of Newton direction isn't finite. Jacobian maybe singular or there is a
problem with initial values

Error in ==> solve1 at 127
[x,f,fvec,check]=lnsrch1(xold,fold,g,p,stpmax,func,j1,j2,varargin{:});

Error in ==> dynare_solve at 124
[x,info]=solve1(func,x,j1(r(i):r(i+1)-1),j2(r(i):r(i+1)-1),jacobian_flag,
bad_cond_flag, varargin{:});

Error in ==> steady_ at 120
[oo_.steady_state,check] = dynare_solve([M_.fname '_static'],...

Error in ==> steady at 54
steady_;

Error in ==> parametros at 162
steady;

Error in ==> dynare at 132
evalin('base',fname) ;

Error in ==> Dynare1 at 11
dynare Parametros.mod[/color]

What could be the problem?
Thanks for your attention
Attachments
Parametros.mod
(1.45 KiB) Downloaded 176 times
Nrodriguez
 
Posts: 6
Joined: Thu Feb 24, 2011 6:25 pm

Re: Problem with Initial values

Postby jpfeifer » Mon Mar 07, 2011 7:17 pm

The initial values are typically 0 in a linear model. Hence, I commented the initval part out. Moreover, the timing for K is wrong, so the BK-conditions failed. I guess K is capital, which is a predetermined variable (see the manual). The solution is to use
Code: Select all
predetermined_variables K;

The running mod-file is attached.
Attachments
Parametros.mod
Running version
(1.5 KiB) Downloaded 256 times
------------
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: Problem with Initial values

Postby Tonysax » Sun Aug 14, 2011 9:22 pm

Hi. I'm running a model and I'm getting exactly the same results as Nrodriguez. The difference is that my model is not linearized (and this is a deterministic model, not stochastic), so I don't know what the problem can be. Can anybody help me please?

This is my ".mod" file.

Thank you.
Attachments
Modelo5.mod
(1.82 KiB) Downloaded 118 times
Tonysax
 
Posts: 1
Joined: Sun Aug 14, 2011 8:53 pm

Re: Problem with Initial values

Postby MichelJuillard » Mon Aug 15, 2011 3:14 pm

Try to derive the steady state by hand. It will either tell you if there is a problem with your model or give the right values.
Whenever possible it is always better to work with an analytical steady state.

Best

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 11 guests