Error using TWO instruments in the Ramsey policy
Posted: Wed Sep 03, 2014 4:45 pm
Hi,
I am using the Ramsey policy solver in DYNARE 4.4.3.
Also note that I am using an external steady state file in which the steady-state values of all endogenous variables are saved in a vector named ys.
It works fine if I only use one instrument.
However I get an error message if I use two. My two instruments are G and TAU. In order compute the optimal policy I commented out the two rules for G and TAU and wrote:
where U is the per-period utility.
I get the following error messages:
I noticed that in dyn_ramsey_static.m there is an IF statement for the case in which there is only one instrument and for the case in which there are more.
Can the problem be here? Any idea on how to circumvent it?
Many thanks!
I am using the Ramsey policy solver in DYNARE 4.4.3.
Also note that I am using an external steady state file in which the steady-state values of all endogenous variables are saved in a vector named ys.
It works fine if I only use one instrument.
However I get an error message if I use two. My two instruments are G and TAU. In order compute the optimal policy I commented out the two rules for G and TAU and wrote:
- Code: Select all
planner_objective U;
ramsey_policy(planner_discount=bbeta, irf=0, instruments=(G TAU) );
where U is the per-period utility.
I get the following error messages:
- Code: Select all
Undefined function or variable "ys".
Error in dyn_ramsey_static (line 57)
[inst_val,info1] = dynare_solve(nl_func,ys(k_inst),0);
Error in evaluate_steady_state (line 55)
[ys,params] = dyn_ramsey_static(ys_init,M,options,oo);
Error in resol (line 104)
[dr.ys,M.params,info] = evaluate_steady_state(oo.steady_state,M,options,oo,0);
Error in stoch_simul (line 88)
[oo_.dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_);
Error in ramsey_policy (line 25)
info = stoch_simul(var_list);
Error in optinv_sec_ord (line 677)
ramsey_policy(var_list_);
Error in dynare (line 180)
evalin('base',fname) ;
I noticed that in dyn_ramsey_static.m there is an IF statement for the case in which there is only one instrument and for the case in which there are more.
- Code: Select all
if inst_nbr == 1
inst_val = csolve(nl_func,oo.steady_state(k_inst),'',options_.solve_tolf,100);
else
[inst_val,info1] = dynare_solve(nl_func,ys(k_inst),0);
end
Can the problem be here? Any idea on how to circumvent it?
Many thanks!