I have a non linear model and I would like to compute the Ramsey policy in it.
In short, my code is
var (...) ;
varexo eps_gamma ;
parameters (...);
load_params_and_steady_state(ParamMatrix);
model;
(...) //I removed the monetary policy: n equations, n+1 variables
end;
initval;
(...)
end;
shocks;
var eps_gamma = 1;
end;
planner_objective((sigmac/(sigmac-1))*(c-bc*c(-1))^((sigmac-1)/sigmac) - (1/(1+sigmal))*lh^(1+sigmal));
ramsey_policy(planner_discount=0.99,order=1);
I've got the following error message:
Starting Dynare (version 4.1.2).
Starting preprocessing of the model file ...
Reading ParamMatrix.
Assertion failed: lag == 0, file DataTree.cc, line 82
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
??? Error using ==> dynare at 126
DYNARE: preprocessing failed
It seems that it does like my welfare. If I put ln(c) instead, I have:
Starting Dynare (version 4.1.2).
Starting preprocessing of the model file ...
Reading ParamMatrix.
Found 85 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
- order 2
Computing static model derivatives:
- order 1
- order 2
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.
Warning: Log of zero.
> In model_FA_NL_ZLB at 680
In dynare at 132
Warning: Rank deficient, rank = 0, tol = 1.#INFe+000.
> In dyn_ramsey_static_ at 106
In dynare_solve at 72
In dr1 at 116
In resol at 128
In stoch_simul at 42
In ramsey_policy at 25
In model_FA_NL_ZLB at 708
In dynare at 132
STEADY: numerical initial values incompatible with the following equations
20 25 35 86
??? Error using ==> dynare_solve at 82
exiting ...
Error in ==> dr1 at 116
[oo_.steady_state,info1] = dynare_solve('dyn_ramsey_static_', ...
Error in ==> resol at 128
[dr,info,M_,options_,oo_] = dr1(dr,check_flag,M_,options_,oo_);
Error in ==> stoch_simul at 42
[oo_.dr, info] = resol(oo_.steady_state,0);
Error in ==> ramsey_policy at 25
info = stoch_simul(var_list);
Error in ==> model_FA_NL_ZLB at 708
ramsey_policy(var_list_);
Error in ==> dynare at 132
evalin('base',fname) ;
I checked for the error:
Warning: Log of zero.
> In model_FA_NL_ZLB at 680
In dynare at 132
I see that one variable equals infinity at the s.s, but I do not know which one is, I couldn't find the variables' order since oo_.dr does not exist.
So my questions would be:
- why doesn't it accept my first welfare,
- how can I find the order of variables (if I am right, the variables are re-organized classified by predetermined,...)
Thanks for your help!
Céline