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 dipenarya » Wed Aug 27, 2014 3:42 am

Hi,

I am trying to simulate the extended model of Iacoviello (2014) - for his paper titled Financial Business Cycles.

I have created a bare version of the model, which should check out, but after several attempts, I have encountered an error message which reads: "An infinite element was encountered when trying to solve equation(s) 27 with respect to the variable(s): epss."

How do I correct this and get my steady state results? Could it be that there is a problem with my initial values?

Please help! Attached is my ".mod" file and the paper.

Thank you!

Dipen
Attachments
Iacoviello - FBC.pdf
Iacoviello (2014) - Financial Business Cycles
(361.3 KiB) Downloaded 101 times
new3.mod
Iacoviello 2014 - Financial Business Cycles (extended model)
(4.52 KiB) Downloaded 115 times
dipenarya
 
Posts: 2
Joined: Wed Aug 27, 2014 3:35 am

Re: An infinite element was encountered

Postby jpfeifer » Wed Aug 27, 2014 8:02 pm

I would say your shock equations are wrong. Look at e.g.
Code: Select all
exp(az)=rhoaz*exp(az(-1))+vz;

For the rhoaz not equal to 0 the only steady state would be exp(az)=0, but this is impossible as it would imply az=-Inf. Either drop the exp() in these equations or rewrite them in the correct way as e.g.
Code: Select all
exp(az)=exp(az(-1))^rhoaz*vz;

Note that this inconsistent log substitution you performed also affects the other equations of the model were the shocks enter. You need to define them consistently. This is the reason the error message appears.
------------
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 dipenarya » Wed Aug 27, 2014 9:20 pm

Thank you, Johannes.

I made the changes to all 4 shock equations as you recommended. The model still won't compute the steady states. It is still showing the same error message:
"An infinite element was encountered when trying to solve equation(s) 27 with respect to the variable(s): epss."

Shock equations were changed as recommended, to:

%Shock Equations (30-33):
exp(epse)=(exp(epse(-1)))^rhobe*ve; //% Shock to repayment of subprime guy
exp(epss)=(exp(epss(-1)))^rhobh*vs; //% Shock to repayment of subprime guy
exp(ak)=exp(ak(-1))^rhoak*vk;
exp(az)=exp(az(-1))^rhoaz*vz;
dipenarya
 
Posts: 2
Joined: Wed Aug 27, 2014 3:35 am

Re: An infinite element was encountered

Postby jpfeifer » Wed Aug 27, 2014 9:23 pm

As I said, the other equations most probably need to be adjusted as well to reflect that fact that exp(epse) will be 1 in steady state.
------------
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 Oriana » Sat Jan 10, 2015 11:16 am

Hi! I have few experience with dynare, nevertheless I am dealing with a rather complex model.

Recently a got the following error

An infinite element was encountered when trying to solve equation(s) 140
with respect to the variable(s): c2thetawvar.

The equation 140 is

// wages and marginal rate of substitution
exp(c2wdes_pot)/ exp(c2w_pot) = (1+c2tauw)/(1+c2thetaw*(exp(c2thetawvar)));

Accordingly to the previous information the equation must be changed or initial values are not well define.

Could someone, please, help me on this matter.
Attachments
oilmodJRstickycombodynarenonlinear.mod
(42.65 KiB) Downloaded 76 times
oilmodJRstickycombodynarenonlinear_steadystate .m
(8.47 KiB) Downloaded 72 times
Oriana
 
Posts: 67
Joined: Fri Jul 18, 2014 2:49 pm

Re: An infinite element was encountered

Postby jpfeifer » Mon Jan 12, 2015 8:11 pm

Please use a proper steady state file. Due to the space at the end of the file name, the current one is not recognized.
------------
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


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 12 guests