Hi,
I would like to know if there is any way to combine the MCMC estimates from two models (same specification, only with different seeds)?
Let say I have MCMC.1 and MCMC.2 models, both of them are estimated by MCMC estimation (with 500000 iterations and burn-in = 5000) but using different random seeds. Can I "merge" the results to generate an average estimate across two models?
Thanks.
Vivian
Combine MCMC models
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: Combine MCMC models
If you request that R2MLwiN runs the models in parallel then this merging will happen automatically (see the last example in http://www.bristol.ac.uk/cmm/media/r2ml ... ide05.Rout).
If you are running the models separately then you will need to manually combine the values held in the output object. Depending on which information you are trying to extract you can do this by joining the chains using the coda package (https://cran.r-project.org/web/packages/coda/) and then summarising them or applying Ruben's rules to the point estimates. For an example of how R2MLwiN does then when running the models together see lines 2900 onward in https://github.com/rforge/r2mlwin/blob/ ... runMLwiN.R.
If you are running the models separately then you will need to manually combine the values held in the output object. Depending on which information you are trying to extract you can do this by joining the chains using the coda package (https://cran.r-project.org/web/packages/coda/) and then summarising them or applying Ruben's rules to the point estimates. For an example of how R2MLwiN does then when running the models together see lines 2900 onward in https://github.com/rforge/r2mlwin/blob/ ... runMLwiN.R.
-
- Posts: 30
- Joined: Tue Apr 12, 2016 10:54 am
Re: Combine MCMC models
Thanks! I will have a try.