Automatic tuning of mh_jscale to attain desired acceptance ratio

Hi All
In the Dynare optimiser number 6 - based on MCMC - the jumping scale of the MCMC movements is tuned automatically to attain a target acceptance ratio.
I wonder if this facility is available for the ‘proper’ MCMC too. Is there a way in which we can specify the desired acceptance ratio - say 20% - and then let Dynare to configure the best mh_jscale to achieve the target ratio?
I mention this because I am estimating a small scale model on 75 real-time data vintages using the parfor loop in Matlab’s parallel computing toolbox. At the moment, the only way I know to adjust the acceptance ratio is to go into the subfolder for each estimation (1 subfolder for each vintage), and then adjust the mh_jscale for each. Not particularly efficient.

Any thoughts from the community?

Thanks
Reuben

No, that feature is not yet available. We always wanted to add it, but it is quite some work. That being said, in your application, acceptance rates should not fluctuate too much with vintage. So once you have tuned the MCMC properly, you should be able to keep the scaling fixed.

Thanks Johannes. I can try that out. When we run mode_compute=6, a file named filename_optimal_mh_scale_parameter (or something similarly named) gets saved in the current directory and there is a scalar called Scale saved in that file. What exactly is the role of this file?
Thanks
Reuben

Dear Reuben, this is the scale parameter in the jumping distribution that allows to match the targeted acceptance ratio (given the current estimate of the posterior covariance matrix).

Best,
Stéphane.

Thanks Stephane
Does that imply that if we use the saved Scale from the mode_compute=6, and use it as the mh_jscale for the proper MCMC, we would attain the same acceptance ratio? I guess not…
Reuben

If you run a MCMC just after mode_compute=6 there is nothing to do, the scale parameter will be the one obtained in the mode finding step and the covariance matrix will also be the one estimated iteratively from the draws in this first step. But if you use this scale parameter with another covariance matrix for the jumping distribution it is most likely that you will not obtain the desired acceptance ratio.

Best,
Stéphane.

Thanks Stephane.
Would your response imply that if we set
options_.gmhmaxlik.target
to say 0.20 (from what I understand that implies an acceptance ratio of 20%)…the Scale would be the ‘optimal’ value necessary to get an average acceptance ratio of 0.2.
And then on, when we want to implement ‘proper’ MCMC with an acceptance ratio of 0.20, then this is done automatically?

Best
Reuben

Yes… Though I am not sure to understand what you mean by proper MCMC. If the MCMC is triggered by mh_replic>0 in the estimation command, following the optimization of the posterior kernel with mode_compute=6, you should observe an acceptance ratio close to the target. If you observe a difference between the target and the actual value, please report this as a bug.

I did not use this since ages, but I suppose that you should not use option mh_jscale in this case.

Best,
Stéphane.

That said, I am not sure that in your case this approach is the best one… mode_compute=0 is really slow (you should probably change the options described here). It would probably not be so hard to write a routine to do the same thing with the other optimization algorithms. I have just opened a ticket for that, I will try to implement this for 4.6.

Best,
Stéphane.

Thanks again, Stephane. I use mode_compute=6 as the last step in a sequence of optimisations.
It seems to almost always deliver a positive definite Hessian at the mode. Yes, I have tweaked the options in options_.gmhmaxlik to speed up things. Yes, ‘proper’ MCMC meant mh_replic>0. Thanks a lot.