Page 1 of 1

An infinite element was encountered

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

Re: An infinite element was encountered

PostPosted: Wed Aug 27, 2014 8:02 pm
by jpfeifer
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.

Re: An infinite element was encountered

PostPosted: Wed Aug 27, 2014 9:20 pm
by dipenarya
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;

Re: An infinite element was encountered

PostPosted: Wed Aug 27, 2014 9:23 pm
by jpfeifer
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.

Re: An infinite element was encountered

PostPosted: Sat Jan 10, 2015 11:16 am
by Oriana
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.

Re: An infinite element was encountered

PostPosted: Mon Jan 12, 2015 8:11 pm
by jpfeifer
Please use a proper steady state file. Due to the space at the end of the file name, the current one is not recognized.