Page 1 of 1

Problem with Initial values

PostPosted: Mon Mar 07, 2011 3:28 pm
by Nrodriguez
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

Re: Problem with Initial values

PostPosted: Mon Mar 07, 2011 7:17 pm
by jpfeifer
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.

Re: Problem with Initial values

PostPosted: Sun Aug 14, 2011 9:22 pm
by Tonysax
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.

Re: Problem with Initial values

PostPosted: Mon Aug 15, 2011 3:14 pm
by MichelJuillard
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