I am solving a New Keyensian Model with Epstein-Zin preference. The model is pretty standard and parameters seems ok. I get the steady state values right. But Dynare report the following error afterward:
??? Error using ==> eig
Input to EIG must not contain NaN or Inf.
Error in ==> dyn_first_order_solver at 163
dr.eigval = eig(e,d);
Error in ==> stochastic_solvers at 172
[dr,info] = dyn_first_order_solver(jacobia_,M_,dr,options_,task);
Error in ==> resol at 118
[dr,info] = stochastic_solvers(dr,check_flag,M,options,oo);
Error in ==> check at 73
[dr,info,M,options,oo] = resol(1,M,options,oo);
Error in ==> CAM at 371
oo_.dr.eigval = check(M_,options_,oo_);
Error in ==> dynare at 120
Please help me look at the code attached, thanks.
ModelHelp.mod (4.75 KB)
The unstable version says:
[quote]STEADY: The Jacobian contains Inf or NaN. The problem arises from:
STEADY: Derivative of Equation 18 with respect to Variable w (initial value of w: 0)
STEADY: The problem most often occurs, because a variable with
STEADY: exponent smaller than 1 has been initialized to 0. Taking the derivative
STEADY: and evaluating it at the steady state then results in a division by 0.[/quote]
Your problem comes from equation 18
w is 0 in steady state. Is the equation correct?
Thanks, the problem solved when I specify a non zero steady state value for w. Another question, do you know if dynare report forward-looking variable(s)? I have another error, need help.
There are 13 eigenvalue(s) larger than 1 in modulus
for 14 forward-looking variable(s)
The rank conditions ISN’T verified!
??? Error using ==> print_info at 43
Blanchard Kahn conditions are not satisfied: indeterminacy
Error in ==> stoch_simul at 81
Error in ==> CAM at 388
info = stoch_simul(var_list_);
Error in ==> dynare at 120
Search the forum for this. Typically, the reason is a violation of Dynare’s timing convention for predetermined variables (see the manual)
Thanks for the help. In my case, I don’t have capital in the model and seems the timing convention is right. Is there any other possible for this problem to occur? I attach a simplified version of the code, could you please help me identify the problem?
ModelHelp.mod (4.28 KB)
I changed the discount rate of beta from 0.99 to 0.7, then the rank condition satisfied (There are 14 eigenvalue(s) larger than 1 in modulus for 14 forward-looking variable(s) ). The problem is this low discount factor is unrealistic. Seems there should be some other problems with the code. Could you please help me look at the code and identify the problem? Thanks.
Without knowing the model, this is impossible. There is nothing immediately suspicious. I am afraid you have to debug your code yourself.
This is the code to replicate Li and Palomino (2013), Epstein-Zin preference, sticky price, sticky wage, permanent TFP shocks( z is the growth rate of TFP in the code). Even thought beta = 0.7 works, but the results value are significantly different from their results. I guess there are some other places wrong with the code. Do you need more info to be able to look at my code and identify the problem? Thanks.
I get the same error message as stated in the subject of this forum. Now, I tried to run it with the unstable version of Dynare to get a more detailed error message as in the post by jpfeifer, however, I just get the same message as with the stable version. I guess the unstable version does not have this nice feature any more (the post by jpfeifer is already 3 years old)? or do I have to include some command in the .mod file before I run it with the unstable version to get such a message?
thanks a lot!
No, the feature is still there, but your mod-file seems to not trigger it. Please provide the mod-file.