Use mh_jscale from previous estimation

Dear all,

In a sequential estimation approach, I would like to use the mh_jscale parameter from a previous estimation with mode_compute=6. The manual suggests to use 'scale_file' in the posterior_sampler_options. However, the loaded scale parameter seems to be ignored in my application. Using fs2000.mod, I show my approach and what I would expect:

  1. Determine mode and mh_jscale using mode_compute=6 in fs2000_step1.mod. This is the original fs2000.mod file with line 125 changed to
    estimation(order=1, datafile=fsdat_simul, nobs=192, loglinear, mh_replic=0, mode_compute=6);
    The estimation saves Scale=0.6669 in fs2000/Output/fs2000_optimal_mh_scale_parameter.mat.

  2. Load mode and mh_jscale from previous estimation in fs2000_step2.mod. Again, only line 125 is changed to:
    estimation(order=1, datafile=fsdat_simul, nobs=192, loglinear, mh_replic=200, mode_compute=0, mode_file='fs2000/Output/fs2000_mode.mat', posterior_sampler_options = ('scale_file', 'fs2000/Output/fs2000_optimal_mh_scale_parameter.mat'));

I would expect that step 2 delivers the same MH acceptance ratios as if I included the scale parameter directly by using:
estimation(order=1, datafile=fsdat_simul, nobs=192, loglinear, mh_replic=200, mode_compute=0, mode_file='fs2000/Output/fs2000_mode.mat', mh_jscale=0.6669);
However, this is not the case. Any ideas why?

The code attached.
fs2000_sequential.zip (6.3 KB)

I can confirm this is a bug. A fix is at check_posterior_sampler_options: make global variable an input (!1999) · Merge requests · Dynare / dynare · GitLab and will be in version 5.1.

Thank you very much. Your fix solves the issue.