Problems about replication of dynare working paper15

Hello everyone,

I want to get the planner_objective_value after the command ‘ramsey_policy’ when replicating the dynare wp15(dynare.org/wp-repo/dynarewp015.pdf), but after all other steady states the dynare said (at this time I was using the dynare 4.2.4):

Reference to non-existent field ‘endo_nbr’.

Error in evaluate_planner_objective (line 36)
endo_nbr = M.endo_nbr;

Error in ramsey_policy (line 31)
oo_.planner_objective_value = evaluate_planner_objective(M_,options_,oo_);

Error in ARGEMmin111 (line 530)
ramsey_policy(var_list_);

Error in dynare (line 120)
evalin(‘base’,fname) ;

Then I updated the version to dynare 4.4.3, and dynare said:

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 ARGEMmin111 (line 931)
ramsey_policy(var_list_);

Error in dynare (line 180)
evalin(‘base’,fname) ;

I totally have no idea of these errors, is there sth wrong with the dynare version? How can I fix it to get the planner_objective_value in the end? I modified the original .mod file according to the comments in it, did I made any mistakes?

Any help will be appreciated!!!
ARGEMmin_ramsey.mod (13.1 KB)

Those messages are strange. Try running the mod-file in a new, empty folder. If that does not help, please try the most recent Dynare unstable version.

Thank you soooo much!!! I installed the latest unstable version and there are no errors at all!!! However, the values I got are different from those in the paper…sitll can’t figure out why… :open_mouth: :open_mouth: :open_mouth:

Could you please cross-check your results with Dynare 4.2.0, which the original paper seems to have used: dynare.org/release/windows/

I tried this version at the first time and couldn’t find the planner objective value, so I updated it to 4.2.5…

What is different? The IRFs in Dynare 4.2 are identical to the IRFs in the unstable version.

The value of loss function in ramsey is different. For example, the value of planner objective function for CB style A in the case of optimal policy under commitment in the unstable version is 6.3995, while the loss in the same case is 115.7 in the paper(Table 13). Why they are different from each other since the planner objective is exactly the loss function?

I am not sure that Dynare does report the same measure as the authors.

Haha, at least it does report sth, which helps me a lot. Thank you very much and have a good day!