Trouble running Dynare files downloaded from AEA:macro site

Hello. I am new to Dynare, and my macro skills are still a work in progress.

I downloaded the replication data and Dynare files for:

Jin and Li (2018), “International transmission with heterogeneous sectors”.

When I try run the files on Dynare, following readme-file-instructions accompanying the materials, I get errors I do not understand.

Could the actual files, downloaded from the AEA-OPENICPSR site be problematic? Or am I doing something wrong when attempting to run the files?

Could someone help with this?

Thank you.

What are the error messages?

Thank you for your reply.

There are 7 errors when I run the general_bond_labor_estimation.mod file:

  • 1 error in “general_bond_labor_estimation_steadystate” - “Too many arguments”;
  • 2 errors in “evaluate_steady_state_file”;
  • 2 errors in “steady”;
  • 1 error in “general_bond_labor_estimation.driver”; and
  • 1 error in “dynare”.

I tried attaching a screen shot but the upload-processing was slow; I shall re-try following this post.

Thanks again.

I have now tried to upload a screenshot a few times, but the upload-processing seems to be stuck in an infinite loop.


suggests you are not using the correct Dynare version. You most probably need to stick to Dynare 4.5.7.

Thank you very much. I will try that now.

Hello professor Pfeifer,

Today, I started by switching from Dynare 4.6.4 to 4.5.7.

There were then new errors to deal with. Below are the main points:

  1. Error: “identifier delta in the evaluated statement does not refer to the external function”.

This made me notice that the mod files included parameters named delta, phi and theta, which, as I understand, could conflict with Matlab functions.

To fix this, I renamed them as deltan, phin, and thetan.

While doing this I noticed that phi was only listed but not used anywhere in the mod files.

Result after renaming the parameters: some output was produced, with a warning during processing, then:

  1. More errors when running baseline.mod, the first of which was “error using print_info – the steady state contains NaN or Inf”.

This made me think that phi appearing once in the list of parameters could be the issue.

It turns out there is also a parameter ‘PHY’ which is present in the equations where it is expected, so I believed ‘phi’ shouldn’t be listed.

So, I removed ‘phi’ from the parameters list.

Result after removing ‘phi’: some output was produced, and with the same error about NaN/Inf. Then:

  1. I noticed that the warning while processing the general_bond_labor_estimation.mod file was that some parameters had no values, including:

std2_shock, K1wbar, K2wbar, Y1wbar, Y2wbar, h1bar, h2bar.

Looking at the mod files, std1_shock = std2_shock, and the parameter “std1_shock” is used in the mod files as a substitute for std2_shock.

So, I deleted std2_shock from the mod files.

Result after removing “std2_shock”: still a warning about no values for K1wbar, K2wbar, Y1wbar, Y2wbar, h1bar, h2bar. Then:

  1. Turns out that K1wbar, K2wbar, Y1wbar, Y2wbar are listed as parameters but not used anywhere. As these are country aggregates, I thought I could either include equations summing up across sectors for each country, or instead, that I could simply remove K1wbar, K2wbar, Y1wbar, Y2wbar from the list of parameters in the mod files.

I chose to remove them.

Result: same errors as before, although now only h1bar and h2bar have no values. Then:

  1. h1bar and h2bar are listed as parameters in the 2 mod files, and they are also used twice each in the steadystate.m file.

Here, they are stated as equal to c1bar and c2bar respectively, and also equal to log(h1bar) and log(h2bar) respectively, while we also have c1bar = c2bar.

As an experiment I tried removing h1bar and h2 bar from the parameter lists in the mod files, and replacing them by c1bar and c2bar in the steadystate.m file – keeping in mind that their inclusion did not seem to be as superfluous as the other parameters I had removed earlier.

Result: the warning while running the mod files now includes many steadystate variables with no values.

Bottom line: I realize step 5 may have been incorrect to do, but I think that steps 1 to 4 make sense. If this is the case, then while I have not managed to arrive at final results, there may be errors in the mod files. I cannot confirm what I am right or wrong about.

Could you comment on this, and also advise me on what to try next?

Kind regards,

Correction: in point 4 above, I meant to type that the variables Y1wbar and Y2wbar etc are World aggregates for each of the two sectors, so I would have added equations that added country 1 and country 2 output for each sector, rather than “summing across sectors for each country”.

Have you tried to contact the authors how to run their code?

No, I never contacted authors of papers before, so I had not thought about that. I can do that today.