Same code, different results for different computers and versions


#1

Hello,
my computer is macOS 10.13.6. I installed MATLAB 2018a and Dynare 4.5.5. When I run a Dynare code, it comes out error. This code can be downloaded with following link.
[https://www.frbsf.org/economic-research/files/wp2012-13supplement_replication_files.zip]
(Mr. Mark Spiegel put it on his website.)

Specifically, when I typed ‘dynare Bench’ or ‘dynare Flex’, it showed ‘Preprocessing completed’ and the following words:

Reference to non-existent field ‘ghx’.

Error in evaluate_planner_objective (line 44)

Gy = dr.ghx(nstatic+(1:nspred),:);

Error in ramsey_policy (line 57)

oo_.planner_objective_value =

evaluate_planner_objective(M_,options_,oo_);

Error in Bench (line 616)

ramsey_policy(var_list_);

Error in dynare (line 223)

evalin(‘base’,fname) ;

Then I try another computer with Windows system, using MATLAB2018a and Dynare 4.5.5. It comes out same error.
But I try it with dynare 4.4.3 and there is no error.

Also, I ask my two classmates to use their computer and run the same code ,they get no error too.

I use many different Dynare versions in MaxOS, but nothing changes. I am wondering whether the issue is regarding MacOS or Dynare version.

Thank you!


#2

The reason is that the mod-file is wrong. First of all, the noprint-option prevents the display of a proper error message. If you disable it, you will get

Error using print_info (line 152)
Ramsey: The steady state file does not solve the static first order conditions conditional on the instruments.

The reason is equation 2:

(Phi_m/(m_ss*Lambda_ss))*exp(-m-Lambda) = 1-(beta/(lambda_z*pi_ss))*exp(Lambda(+1)-Lambda-pi(+1));

Given the steady_state_model-block with a 0 for all variables, the simplifies to

(Phi_m/(m_ss*Lambda_ss)) = 1-(beta/(lambda_z*pi_ss));

The LHS evaluates to 0.0172, the RHS to 0.0294.

You can verify at https://github.com/DynareTeam/dynare/wiki/FixedBugs that in 4.5.0, a bug was fixed where incorrect steady states were accepted in Ramsey. That suggests that the results of the published paper are wrong.


#3

Thank you so much for getting back to me.

Best regards.