steady state contains NAN or Inf
Posted: Wed Dec 03, 2014 1:24 pm
Hi,
I am on my first project with dynare. I have modified the Smets and Wouters (2007) model (SW07) with endogenous growth. My code seemed to work fine but now I want to add a variable to measure persistent effects on output and end up getting the Error: "The steady state contains NaN or Inf." when trying to go for stoch_simul. I could narrow down the problem to two lines of code:
The dy is the measurement equation from SW07 for later estimation. The YL is the persistent effect I want to measure. Later I would add gamma(-1) to measure the cumulative effect in from gamma. But to make sure it is not the errors cause I commented it out and leave only the first part which should just equal YL = y in a complicated way. When I leave either line out the code works. If both lines are in I get the error.
I put in resid(1) to check and the dy-equation was not zero but equalled ctrend, which never was a problem before.
Why do these two lines interfere? Thanx for any help.
P.S.:
When making YL a trending variable with a deflator very close to one the problem disappears.
cgamma = 1.0043
I am on my first project with dynare. I have modified the Smets and Wouters (2007) model (SW07) with endogenous growth. My code seemed to work fine but now I want to add a variable to measure persistent effects on output and end up getting the Error: "The steady state contains NaN or Inf." when trying to go for stoch_simul. I could narrow down the problem to two lines of code:
- Code: Select all
dy=y-y(-1)+gamma(-1)+ctrend;
YL = y-y(-1) + YL(-1); //+gamma(-1);
The dy is the measurement equation from SW07 for later estimation. The YL is the persistent effect I want to measure. Later I would add gamma(-1) to measure the cumulative effect in from gamma. But to make sure it is not the errors cause I commented it out and leave only the first part which should just equal YL = y in a complicated way. When I leave either line out the code works. If both lines are in I get the error.
I put in resid(1) to check and the dy-equation was not zero but equalled ctrend, which never was a problem before.
Why do these two lines interfere? Thanx for any help.
P.S.:
When making YL a trending variable with a deflator very close to one the problem disappears.
- Code: Select all
trend_var (growth_factor = cgamma^0.001) TFP;
var (deflator=TFP) YL;
cgamma = 1.0043