arviz.
rhat
(data, var_names=None)[source]¶Compute estimate of Split Rhat for a set of traces.
The Split Rhat diagnostic tests for lack of convergence by comparing the variance between multiple chains to the variance within each chain. If convergence has been achieved, the betweenchain and withinchain variances should be identical. To be most effective in detecting evidence for nonconvergence, each chain should have been initialized to starting values that are dispersed relative to the target distribution.
Parameters: 


Returns: 

Notes
The diagnostic is computed by:
\[\hat{R} = \frac{\hat{V}}{W}\]
where \(W\) is the withinchain variance and \(\hat{V}\) is the posterior variance estimate for the pooled traces. This is the potential scale reduction factor, which converges to unity when each of the traces is a sample from the target posterior. Values greater than one indicate that one or more chains have not yet converged.
References
Gelman et al. BDA (2014) Brooks and Gelman (1998) Gelman and Rubin (1992)