From 4.4.3 to 4.5.4

Dear professor Pfeifer and dynare users,

I noticed that the CTW (2011) code runs with dynare 4.4.3 (Johannes mentioned it in a previous post) and other earlier versions of dynare. But it does not work with 4.5.4 version (I have tried with 4.5.0 too and it did not work either, so the problem may be with the 4.5.0 update). I am using the code and files in their “CTW main model estimation” folder without alteration.

Would you have any idea what is going on, and how to fix it?

Thank you for your very useful help in this forum.

Below is the error I get:


You did not declare endogenous variables after the estimation/calib_smoother command.
The posterior mode file ctw_employer_surplus_mean_MASTER has been generated using an older version of Dynare. It cannot be verified if it matches the present model. Proceed at your own risk.

Warning: Some of the parameters have no value (mupsiPercent) when using initial_estimation_checks. 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…
Error in computing likelihood for initial parameter values

ESTIMATION_CHECKS: There was an error in computing the likelihood for initial parameter values.
ESTIMATION_CHECKS: If this is not a problem with the setting of options (check the error message below),
ESTIMATION_CHECKS: you should try using the calibrated version of the model as starting values. To do
ESTIMATION_CHECKS: this, add an empty estimated_params_init-block with use_calibration option immediately before the estimation
ESTIMATION_CHECKS: command (and after the estimated_params-block so that it does not get overwritten):

Error using print_info (line 42)
Blanchard Kahn conditions are not satisfied: no stable equilibrium

Error in print_info (line 42)
error([‘Blanchard Kahn conditions are not satisfied: no stable’ …

Error in initial_estimation_checks (line 175)
print_info(info, DynareOptions.noprint, DynareOptions)

Error in dynare_estimation_1 (line 165)
oo_ =
initial_estimation_checks(objective_function,xparam1,dataset_,dataset_info,M_,estim_params_,options_,bayestopt_,bounds,oo_);

Error in dynare_estimation (line 105)
dynare_estimation_1(var_list,dname);

Error in ctw_employer_surplus (line 2767)
oo_recursive_=dynare_estimation(var_list_);

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

Could you please provide the codes

Thank you for your answer.

Here is the mod file and the other files needed for it.

Files_dynare_forum.zip (109.2 KB)

This is a tricky one. In 4.5.0 we fixed a bug:

Due to a bug in mjdgges.mex unstable parameter draws with eigenvalues up to 1+1e-6 could be accepted as stable for the purpose of the Blanchard-Kahn conditions, even if qz_criterium<1

See https://github.com/DynareTeam/dynare/commit/e3fbefc616941d0df3624bfc49a1a743171f8814

The model you have is in this region. Numerically, the mode is close to the boundary of this stability region, creating the problem.

Thank you very much for looking into this. It was a tricky one indeed. That is indeed consistent with the code failing from 4.5.0.

I have a couple more questions, if you do not mind:

  1. What does this say about existence of an equilibrium and stability in the model?
  2. Do you think more reasonable eigenvalues could be obtained with a different calibration and estimation?
  3. Would you have any clues on how to solve the problem?
  1. It does not say much. The model is really big, leading to numerical inaccuracies and the deviations from the stability region are small.
  2. My hunch is that if you rerun the estimation in Dynare 4.5 you will get very similar results. The problem is that you cannot start with their reported mode.
  3. Given that this is a numerical issue, you may be able to simply alter qz_criterium to restore the previous behavior.

Thank you again for your time and insigthful comments. I am nominating you for the most helpful and selfless economist ever.