# RW Metropolis-Hastings current acceptance ratio

Hi everyone

Regarding to RW Metropolis-Hasting algorithm, Dynare compute the RW Metropolist-Hasting acceptance ratio as R = no. accepted draws/ No. Proposals. My understanding is correct? otherwise, please correct me

Normally, we prefer that the acceptance ratio should not be very close to 0 or 1, an ideal ratio is around 1/3. To reach this ideal ratio, we should adjust the jump scale (in Dynare, we adjust by using mh_jscale).

Based on that, I set my jump scale with 0.3. Moreover, I set number of the MH Chain with 10 and number of interation with 200,000. So then lauching Dynare, I found that

for the first MH Chain, Dynare reports the RW Metropolis-Hasting (1/10) Current acceptance ratio of around 0.256 (I think it is good since this ratio is not far from an ideal ration of 1/3).
However, the RW Metropolis-Hasting (2/10) Current acceptance ratio reduces a lot to 0.129 in the second MH Chain. This acceptance ratio of 0.129 is very far from the ideal ratio of 0.333 eventhough I do not change the jump scale. The jump scale is still the same as 0.3 in the first MH Chain
This situation questions me? why the acceptance ratio is not identical for all MH Chain with the same jump scale (mh_jscale = 0.3 as the beginning )
Since I would target the acceptance ratio with around 1/3, how I can adjust the jump scale to MAKE SURE that the acceptance ratio is identical for all the MH Chains and it should not change among MH Chain under the same setting of the jump scale with 0.3?
any suggestion for my questions is encouraged
Thank guys a lot

Dear Peter,

Your understanding of the acceptance ratio is correct.

Regarding your last question: this is simply impossible. You cannot tune a single parameter so that all the chains have the same acceptance ratios. The fact that the acceptance rate is significantly lower in one of the chains is a matter of chance (the initial condition of this chain may be far from the initial conditions of the other chains, and the proposals are obviously different). Frankly I would not bother about this. As long as all the acceptance ratios are strictly positive, there is no trouble.

Best,
Stéphane.

Dear Stephane

With best regards

@peter I tend to somewhat disagree with @stepan-a here. If your acceptance rates are very different, it suggests that you are not sampling from the same distribution, i.e. at least one chain does not sample from the ergodic distribution we are interested in. As @stepan-a says, the difference may just be due to the initial convergence to the ergodic distribution. But this then suggests that the burnin is very large relative to the actual draws, i.e. your chains are too short. For that reason, I would be extremely careful in checking convergence (and the initial mode). Also, you might want to consider fewer, but longer chains in this case.

@jpfeifer I think we agree, this is (more or less) what I said in this post Acceptance Ratio in the MH algorithm, I don’t know why @Peter opened a new topic on the same issue…

Dear Prof. Pfeifer

Thank you so much for your suggestion

acceptance rates are very different between the MH Chains. In particular, in my case as I mentioned before that the acceptance ratio in the first MH chain is 0.256, which is much higher than that of 0.126 in the second MH chain under the same condition (the posterior density, number of interation, and jump scale)
according to @stepan-a 's idea, this situation is a matter of chance (the initial condition of this chain may be far from the initial conditions of the other chains, and the proposals are obviously different)

but @jpfeifer suggest that I am not sampling from the same distribution, i.e. at least one chain does not sample from the ergodic distribution we are interested in.
I still confuse @jpfeifer that all the proposal denities in all MH chains in the MH algorithm is based on the same posterior density. So that, from my point of view, I think all proposal densties in all MH Chains should sample from the same ergodic distribution we are interested in.
Thus, it is impossible that one MH chain does not from the the ergodic distribution we are interested in. Is my understanding correct? If not, please correct me

@peter How many iterations do you have in each chain? My point was that it is not surprising to observe different acceptance ratios if you don’t have enough draws…

Best,
Stéphane.

Dear @stepan-a

At the moment I set 200,000 interation (mh_replic = 200,000) and number of MH Chain = 10. So that, I obtain the total number of draws = 2,000,000.
However, I still have the convergence problem
so that I think I should increase the number of interation for each MH Chain

Dear Peter,

This is most probably the problem, 200 000 is not enough. At this stage, i.e. as long as the chains did not converge to the (common) ergodic distribution, the total number of draw of 2 000 000 is not really pertinent, only the number of iterations per chain matters. As @jpfeifer suggested and as I said earlier I would reduce the number of chains (I never use more than 5), or run the estimation with the parallel capabilities of Dynare.

Best,
Stéphane.

1 Like