Number of Draws and number of Markov Chain

Hi everyone

I have some questions related to the convergence diagnostic

  1. Dynare conduct the Metropolis-Hasting Algorithm when we declare the following command
    For example,
    mh_replic = 100,0000 and mh_nblocks= 100
    it implies that Dynare will obtain number of draws = number of replication * number of the MH Chain = 100,000* 100 = 10,000,000 draws. Futhermore, in this case, number of replication is exactly number of interation in each MH Chain.
    my understanding is correct, if not, please correct me.

  2. My model, I need to estimate 44 unknown parameters. How many number of Markov Chain I should use? any suggestion for that. mh_nblocks=10 is fine for mycase? Because, based on Brooks & Gelman (1998), I know that higher number of the MH Chain is, lower the between variance of parameter means is
    In short, a higher number of the MH chain will improve the computation of the between variance of parameter means

Thank you everyone

Dear Peter,

Your understanding is correct, the total number of draws is mh_replic times mh_nblocks. But remember that, when computing posterior moments, we only used the second half of them. There is no general answer to your second question. The needed number of iterations in a MCMC depends a lot on the properties of the targeted posterior distribution (i.e. on your model, the prior and the data). The number of chains improves the estimates of the between (or within) posterior moments, but this is only related to the assessment of convergence. It does not mean that when you increase the number of chains you increase the speed of convergence to the posterior distribution.

Best,
Stéphane.

Dear Stephane

Thank your so much for your useful answer
Related to your answer : ‘‘The number of chains improves the estimates of the between (or within) posterior moments, but this is only related to the assessment of convergence. It does not mean that when you increase the number of chains you increase the speed of convergence to the posterior distribution.’’

This means that the higher number of chain is, the higher probability the proposed density will close to the posterior density or the closer and more horizontal the red line and blue line in the plot of MCMC univariate convergence diagnostic (Brooks and Gelman, 1998) are. My understanding is correct?

No, it only means that the more you have chains the more precise are the estimates of the between (or within) moments used to build the Brooks and Gelman’s convergence diagnostics. So the more we have chains, the more we can rely on the information conveyed by Brooks and Gelman’s convergence diagnostics.

Best,
Stéphane.

Dear Stephane

I thank you so much for that. I got it

Do you any personal idea for my my model with 44 unknown parameters?
I mean how many total number of draws for that?
how many replications for each MH Chains?
How many MH chain?
I know there is no general answers for them, but Just base on your experiences are still useful for me)

Dear Peter,

These draws are used to approximate posterior moments

\mathbb E [\varphi(\theta)] = \int_{\Theta}\varphi(\theta)p(\theta|\mathcal Y_T)\mathrm d\theta

where \theta is the vector of parameters, \Theta its domain, and p(\theta|\mathcal Y_T) the posterior density. We now from the Strong law of large numbers that the following average:

\mu_{\varphi, N} = \frac{1}{N}\sum_{i=1}^N \varphi(\theta_i)

where \theta_i are draws from the posterior distribution, will converge almost surely to the posterior moment as N goes to infinity. The greater is N the smaller is the variance of the estimate of the posterior moment (the variance of \mu_{\varphi, N} is proportional to the inverse of N ). The approximation error is of order \mathcal O(\sqrt{N}), but this only an asymptotic result. It means that if you want to divide the variance of \mu_{\varphi, N} by ten you need to multiply the number of simulations, N, by one hundred. In practice, the approximation error also depends on the properties of the function to be integrated and on the dimension. If you have 44 parameters it means that you have to compute integrals in a space of dimension 44. If you think of the number of points needed to fill uniformly an hypercube, you understand that N should be quite large to obtain an accurate estimations of the moments.

So to answer to your questions, based on my experience I would expect that millions of iterations are needed. In practice I never use more than five chain. I would start with 200000 draws, look at the convergence diagnostics and the trace plots, and then add more simulations (using the load_mh_file option, otherwise Dynare erase the previous draws). By default, Dynare runs the chains sequentially. There is no reason for that, you can obtain a significant speed up if you run the chains in parallel (see the reference manual about the parallel mode).

Best,
Stéphane.

1 Like