While playing with ways to present visual diagnostics of mcmc I noticed that the rank plots for the 3rd column (non-stationary chains) didn’t look obviously problematic to me. For other seeds, the ecdf plot also looks completely fine to my eyes (
).
I think this is an artefact of the symmetry of the chains, and changing the slopes of the underlying simulation to not be symmetric results in obviously problematic rank plots. This might be obvious to some but surprised me, thus I figured I’d share it here :)
The two chains were generated using
-2 + 0.003 * 1:1000 + arima.sim(list(ar = 0.7), n = 1000, sd = 0.5),
1 + -0.003 * 1:1000 + arima.sim(list(ar = 0.7), n = 1000, sd = 0.5),
in the symmetric and
-2 + 0.003 * 1:1000 + arima.sim(list(ar = 0.7), n = 1000, sd = 0.5),
1 + -0.01 * 1:1000 + arima.sim(list(ar = 0.7), n = 1000, sd = 0.5),
in the asymmetric case.
And here the example with a different seed that I would haven’t thought about twice after a quick look on the rank plots probably (shame on me?)
@jonah Could it be a bug in bayesplot that leads to the missing first 500 ranks for the first chain in my asymmetric (2nd) plot? I can share the full code if you’d like.