Jacobian error: model difference?

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.

Jacobian error: model difference?

Postby Nicole » Fri May 27, 2016 12:29 pm

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!
Attachments
MODEL_4.mod
Model without the error.
(1.02 KiB) Downloaded 101 times
MODEL_5.mod
The model giving the error.
(881 Bytes) Downloaded 134 times
Nicole
 
Posts: 10
Joined: Tue Apr 05, 2016 8:25 am

Re: Jacobian error: model difference?

Postby matheus_silva92 » Fri May 27, 2016 4:48 pm

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.
Attachments
MODEL_5.mod
(899 Bytes) Downloaded 104 times
matheus_silva92
 
Posts: 12
Joined: Tue Mar 01, 2016 11:16 pm

Re: Jacobian error: model difference?

Postby Nicole » Tue May 31, 2016 8:26 am

Thank you so much for your help! Completely overlooked it. Thanks again!
Nicole
 
Posts: 10
Joined: Tue Apr 05, 2016 8:25 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 11 guests