Estimate sthe Gelman-Rubin (rhat) convergence statistic for a single parameter across multiple chains. Basic method, assuming all chains are of equal length
gelman_rubin(par_matrix, chains, samples)
Matrix (interations x chains)
number of chains
number of samples
Gelman-Rubin statistic
Gelman, A., and D. B. Rubin. 1992. Inference from Iterative Simulation Using Multiple Sequences. Statistical Science 7: 457–511.
https://astrostatistics.psu.edu/RLectures/diagnosticsMCMC.pdf