Singularity problem arises when posterior subdraws are taken

Hi all, I tried to generate GDP forecasts by estimating a DSGE model using standard Bayesian methods, and it ended up with the following message when posterior subdraws were taken:

Error using print_info (line 54) One of the eigenvalues is close to 0/0 (the absolute value of numerator and denominator is smaller than 1e-06! If you believe that the model has a unique solution you can try to reduce the value of qz_zero_threshold.

Following some suggestions from previous posts, I also ran model_diagnostics(M_,options_,oo_), and it shows that:

MODEL_DIAGNOSTICS: The Jacobian of the static model is singular

MODEL_DIAGNOSTICS: there is 5 colinear relationships between the variables and the equations

My original estimation command was estimation (smoother, order=1, prefilter=0, datafile=data, presample=4, mh_replic=1000000, mh_nblocks=1, mh_jscale=0.3, mh_drop=0.3, sub_draws=5000, forecast=40, mode_compute=6) gdp;. Since the above singularity problem arises, I changed it to

estimation (..., mh_replic=0, sub_draws=0, mode_compute=0, mode_file=corresponding_mode_file) gdp;


estimation (..., mh_replic=0, sub_draws=0, mode_compute=0, mode_file=corresponding_mh_mode_file) gdp;

and both worked well.

So, my questions are:

  1. Why the singularity problem only arises when posterior subdraws are taken?
  2. How much does it change the estimations results and the forecasts?
  3. Is it reasonable to just calculate the forecasts at the mode or mh_mode, given that the model is a linear one?

And maybe a side issue: The forecasts I obtained by using the mode file and mh_mode file are the same. Why would this happen and does this mean that there’s something wrong with the MH sampling process?


  1. It happens because in this case the decision rules have to be recomputed. There were some small bugs we fixed recently. Could you try whether the same problem happens with the unstable version. If yes, please provide me with the files to replicate the issue.
  2. If you are just interested in the point forecasts, then using the parameters at the mode should be fine.
  3. Regarding your side issue: this suggests that your initial mode was not the true global mode. In that case, you need to carefully check convergence of your chain.