Closed halasadi closed 6 years ago
great. I assume this is all under your EEMs2 model, rather than some simplification/toy setting?
Can I clarify are you saying the R version seems sensible but the C++ results don't?
@stephens999 Yes, this is under the EEMS2 model.
For the R code implementation, I basically tried (as close as possible) to reproduce the C++ code into R to spot any design issues in the MCMC. I ran the R code for simple cases (mixtures of normals as the target distribution and now trying mixtures of multivariate normals ) and the results seem sensible. So I am saying that I can't find obvious problems in any of the two results (C++ and R).
@stephens999 For the simple N(0,1) example you suggested, it seems like the most important thing to consider is the proposal distribution. If the proposal distribution is large enough than the hottest chain is able to explore the entire space pretty well. If it's too small then the colder chains just explore around the middle of no-where. In the below example, the proposal distribution is small. But if I made it bigger than I find the coldest chain samples from N(0,1) reasonably well.
For 40 demes (in which it converges)
_dffree ~ 0.02
Rep0
Rep1
Rep 2
mindf = 1
Rep 0
Rep 1
Rep 2
mindf = 2
Rep0
Rep1
Rep2
Implemented Poisson with boot-strap to correct for curvature of likelihood
I implemented suggestions as setting the rate of long-range proposals to 0, and running multiple mcmc's with temperature 1 and they give sensible results.
diagonostics
Here, I show the results of running multiple the mcmc ladder with all temperature 1 to diagonose the problem.
Here, is the once chain version
And here, is the multiple chains version
Another multiple chains version with another random seed
Now, multiple chains with different temperatures (2, 1.5, 1.25, 1)
It's hard to say something is obviously wrong here.
R code implementation
Next, I implemented the same version used in the C++ code in R. The results seem sensible.