Page 1 of 1

Jacobian error: model difference?

PostPosted: Fri May 27, 2016 12:29 pm
by Nicole
Hi everyone,

I have a question regarding the model I'm running (MODEL_5). When running this small and rather simple model, I get the following error:


STEADY: The Jacobian contains Inf or NaN. The problem arises from:

STEADY: Derivative of Equation 1 with respect to Variable pi (initial value of pi: 0)

STEADY: The problem most often occurs, because a variable with
STEADY: exponent smaller than 1 has been initialized to 0. Taking the derivative
STEADY: and evaluating it at the steady state then results in a division by 0.
Error using dynare_solve (line 60)
An element of the Jacobian is not finite or NaN

Error in evaluate_steady_state (line 66)
[ys,check] = dynare_solve([M.fname '_static'],...

Error in steady_ (line 54)
[steady_state,params,info] = evaluate_steady_state(oo_.steady_state,M_,options_,oo_,~options_.steadystate.nocheck);

Error in steady (line 81)
[steady_state,M_.params,info] = steady_(M_,options_,oo_);

Error in MODEL_gali_gertler (line 130)
steady;

Error in dynare (line 180)
evalin('base',fname) ;



Hence, the problem is in the first equation - x, for the output gap. However, if I run another model (MODEL_4) that includes the same equation for x, I do not get this error. Can someone help me find the difference that is causing this? I'm aware there is quite a difference in the equation for inflation (pi), but is that really causing the issue?

In case you spot anything else I might be overlooking in my .mod file, I'd love to hear. Still learning!

Thank you in advance for your time & help.

Nicole


small edit: typo!

Re: Jacobian error: model difference?

PostPosted: Fri May 27, 2016 4:48 pm
by matheus_silva92
Hi Nicole,

In MODEL_5, there's a small typo at line 13 (you misspelled "lambda").
You're also missing a value for sigma (just write a line "sigma = xx"). Recall that you set sigma = 1 in the MODEL_4 file.

When I changed these, it worked. I'm uploading the new file as well.

Re: Jacobian error: model difference?

PostPosted: Tue May 31, 2016 8:26 am
by Nicole
Thank you so much for your help! Completely overlooked it. Thanks again!