An infinite element was encountered

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.

An infinite element was encountered

Postby rwhitt01 » Tue Nov 11, 2014 6:19 pm

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
Attachments
Mod6.mod
(5.23 KiB) Downloaded 74 times
rwhitt01
 
Posts: 23
Joined: Tue Nov 11, 2014 5:50 pm

Re: An infinite element was encountered

Postby jpfeifer » Tue Nov 11, 2014 6:29 pm

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.
------------
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: An infinite element was encountered

Postby rwhitt01 » Tue Nov 11, 2014 6:49 pm

Hello,

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

Regards,
Richard
rwhitt01
 
Posts: 23
Joined: Tue Nov 11, 2014 5:50 pm

Re: An infinite element was encountered

Postby rwhitt01 » Tue Nov 11, 2014 7:05 pm

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
Attachments
Mod6_1.mod
(5.2 KiB) Downloaded 72 times
rwhitt01
 
Posts: 23
Joined: Tue Nov 11, 2014 5:50 pm

Re: An infinite element was encountered

Postby jpfeifer » Tue Nov 11, 2014 8:40 pm

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?
------------
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: An infinite element was encountered

Postby rwhitt01 » Thu Nov 13, 2014 4:40 am

Thank you Johannes, your insight solved my problem.

Regards,
Richard
rwhitt01
 
Posts: 23
Joined: Tue Nov 11, 2014 5:50 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests

cron