Replication CET 2016

Hi everybody. I am having a hard time replicating the paper “UNEMPLOYMENT AND BUSINESS CYCLES”, by Christiano, Eichenbaum and Trabandt (2016) - Econometrica.

Apparently, the files available in his website (available here estimate the models using impulse response matching. Thus, there is a “data.m” file witch pass-on some random data to avoid Dynare getting stuck. I keep getting an error saying that this “data.m” file doesn’t exists in my current folder.

When loading the file load('resultsAltOffer.mat'), I got this:

Warning: Class 'dates' is an unknown object class or does not have a valid 'loadobj' method. Element(s) of this class in array 'options_' have been converted to structures.

Which may or may not explain my error.

Also, when trying to run the other files, I got always:

`Error using cet_steadystate
Too many input arguments.

Error in evaluate_steady_state_file (line 49)
[ys,params1,check] = h_steadystate(ys_init, exo_ss,M,options);

Error in evaluate_steady_state (line 210)
[ys,params,info] = evaluate_steady_state_file(ys_init,exo_ss,M, options,steadystate_check_flag);

Error in resid (line 66)
evaluate_steady_state(oo_.steady_state,M_,options_,oo_,0);

Error in cet.driver (line 1103)
resid;

Error in dynare (line 293)
evalin(‘base’,[fname ‘.driver’]) ;`

I really need to replicate this results to get my research going. The files can be found in Mathias Trabandt’s webpage in the hyperlink above (the CETcode). The folder is too big to attach here.

Thank you!

Maybe prof. Pfeifer can give me some light @jpfeifer

The reason is that they used a different Dynare version. To use Dynare >4.5.7 you need to modify the steady state file. See Code not working after updating Dynare to 4.6.0
But here, you should stick with the version they used. The warning about dates should go away when you run dynare_config before loading the data. Otherwise, the data format is not known (Alternatively, a previous run of Dynare does the same job).

Dear Prof. Pfeifer, thank you so much for your kind response.

I have 2 questions after trying your suggestion:

  1. My problem running the CET 2016 model persists, even though I ran dynare_config before calling dynare cet.mod as you suggested. I don’t know exactly what the output after running this should’ve been, but I got this:

`>> dynare_config

ans =

'/Applications/Dynare/4.6.4/matlab/‘`

Indeed, the problem with the data.m file is not showing up, but now all I got for every file in the folder is:

`Error using cet_steadystate
Too many input arguments.

Error in evaluate_steady_state_file (line 49)
[ys,params1,check] = h_steadystate(ys_init, exo_ss,M,options);

Error in evaluate_steady_state (line 210)
[ys,params,info] = evaluate_steady_state_file(ys_init,exo_ss,M, options,steadystate_check_flag);

Error in resid (line 66)
evaluate_steady_state(oo_.steady_state,M_,options_,oo_,0);

Error in cet.driver (line 1103)
resid;

Error in dynare (line 293)
evalin(‘base’,[fname ‘.driver’]) ;`

There is a problem with calculating the steady state, but I really don’t want to make any changes in the function available… Do you have any suggestion?

  1. I am also trying to run your code for the Gali book available in your GitHub (file attached). When running it, I encountered the following problem:

Warning: Some of the parameters have no value (lambda_p, lambda_w) when using stoch_simul. If these parameters are not initialized in a steadystate file or a steady_state_model-block, Dynare may not be able to solve the model... Total computing time : 0h00m05s Note: 31 warning(s) encountered in the preprocessor Note: warning(s) encountered in MATLAB/Octave code

but there is indeed a steady_state_model-block (lines 221-224). What do you thing is the issue here?

Thank you very much!

  1. As I wrote above, their code does not work with Dynare 4.6.
  2. It’s all there in the message. As the parameters are indeed set in a steady_state_model-block, there is no problem.

I am sorry if my questions sounded redundant, professor. I understood the fact that this is not the right version, the authors used Dynare 4.4.3 to run it. I tried downloading it but (as expected) it didn’t work for this code and Matlab 2021a. I was wondering if there could be maybe another solution, but it is clear to me now that it doesn’t. Thank you for your time and consideration. Have a great weekend.
Best,
Rafael

You are not listening. There are two options:

  1. Try Dynare 4.5.7, which is the last version before the change in the steady state file was implemented
  2. Use Dynare 4.6.4 and adjust the steady state file according to
    Code not working after updating Dynare to 4.6.0

Will do! Thank you, professor!