I think I found a bug

Hi,

I think I encountered a bug. It happens when I run estimation with:

  1. mh_replic > 0
  2. filter step_ahead > 1
  3. no forecast in the estimation command

The bug is in the function “prior_posterior_statistics” in line 143:
“if options_.smoother || options_.forecast || options_.filter_step_ahead || options_.smoothed_state_uncertainty”

Basically, if both “options_.smoother” and “options_.forecast” are 0, there is an error when comparing them to “options_.filter_step_ahead” if it is a vector (filter step_ahead > 1). It is very weird and about how MATLAB compares doubles and transforms them into logicals.

If it is not clear, I can provide files for an example.

Thanks for pointing this out. The fix is at prior_posterior_statistics.m: fix logical condition (!2114) · Merge requests · Dynare / dynare · GitLab

1 Like