Page 1 of 1

An infinite element was encountered

PostPosted: Tue Nov 11, 2014 6:19 pm
by rwhitt01
Hello,

Being new to Dynare, I do not know to diagnose and resolve a problem I am have with
an infinite element was encountered error.

I have looked at similar postings, but they were not helpful to me.
If someone could be so kind to point out my error and how to fix it in my mod file I would greatly appreciate it.

Thank you in advance.

Regards,
Richard

The error I am getting:
----------------------------
An infinite element was encountered when trying to solve equation(s) 13
with respect to the variable(s): a.
The values of the endogenous variables when the problem was encountered were:
pi 0
y_gap 0
y_nat 0
y 0
r_nat 0
i_nom 0
n 0
x 0
w 0
mc 0
p 0
nu 0
a 0
d 1

Re: An infinite element was encountered

PostPosted: Tue Nov 11, 2014 6:29 pm
by jpfeifer
Your model setup is inconsistent. Everything is already linearized. From
Code: Select all
d =  rho_d * d(-1) + eps_ds;                      // commodity pricing model shock

follows that d=0 in steady state.
But in other equations you use log(d). Is suppose you actually mean just d there. The log(0) explains the problem.

Re: An infinite element was encountered

PostPosted: Tue Nov 11, 2014 6:49 pm
by rwhitt01
Hello,

I did change the code from log(d) to d before posting the code, and it still had the same problem.

Regards,
Richard

Re: An infinite element was encountered

PostPosted: Tue Nov 11, 2014 7:05 pm
by rwhitt01
Hello,

Re-ran the code with the modification of changing : log(d) -> d again, and I get the following error
I have attached to modified code.

Regards,
Richard


An infinite element was encountered when trying to solve equation(s) 5
with respect to the variable(s): y.
The values of the endogenous variables when the problem was encountered were:
pi 0
y_gap 0
y_nat 0
y 0
r_nat 0
i_nom 0
n 0
x 0
w 0
mc 0
p 0
nu 0
a 0
d 0

Error using lnsrch1 (line 71)
Some element of Newton direction isn't finite. Jacobian maybe singular or there is a problem with initial values

Re: An infinite element was encountered

PostPosted: Tue Nov 11, 2014 8:40 pm
by jpfeifer
Code: Select all
y_nat = psi_ya * a + psi_yd*d + v_y;                        // Definition natural output 

looks wrong. If y_nat is in deviation from steady state, why is there a positive constant v_y in the equation?

Re: An infinite element was encountered

PostPosted: Thu Nov 13, 2014 4:40 am
by rwhitt01
Thank you Johannes, your insight solved my problem.

Regards,
Richard