Convergence checks on MCMC draws by split chains, rank normal scores and Monte Carlo error
c(psi_j, s2_j, n, theta, theta_med, r, S, R_bulk, R_fold, S_bulk, e_MC, s_post) = (R_hat, zeta, f_r, R_max, use_draws, r_MC, ok_MC)
Maps stored simulation output to the checks that show whether a Bayesian result has settled. For one scalar estimand it returns the split-chain potential scale reduction factor R_hat from split-chain means and variances (HE-FM-CON-001, with HE-CF-CON-001 for stored draws), the folded draw and rank fraction behind the rank-normalised version (HE-FM-CON-002), the conservative reported value with its use rule (HE-FM-CON-003) and the ratio of Monte Carlo error to posterior standard deviation (HE-FM-CON-004). The precision of independent probabilistic runs is live and is not restated. HE-FN-PSA-001 sets out the Monte Carlo standard error of a mean as the form of HE-FM-ANTV-002 with one observation per draw, HE-CF-PSA-001 computes it, the standard error of a share of runs has the form of SE_p in HE-FM-BINOM-004, an interval around the mean is HE-FM-AN-001, and the draws needed for a target standard error are HE-FM-ABM-003 and HE-FM-ABM-004. The article's sizing example applies these records, its 14,400 runs being HE-FM-ABM-003 with s_run 12,000 and e_target 100, and its 6,147 runs the same record with e_target 300 / 1.96, rounded up. The effective sample size has its own concept page and enters here as an input. Notation follows the Convergence article.
Split-chain potential scale reduction factor from four split chains
psi_bar = (psi_1 + psi_2 + psi_3 + psi_4) / 4; B = n / 3 * ((psi_1 - psi_bar)^2 + (psi_2 - psi_bar)^2 + (psi_3 - psi_bar)^2 + (psi_4 - psi_bar)^2); W = (s2_1 + s2_2 + s2_3 + s2_4) / 4; var_plus = (n - 1) / n * W + B / n; R_hat = sqrt(var_plus / W)
Folded draw and Blom rank fraction for a rank-normalised R-hat
zeta = abs(theta - theta_med); f_r = (r - 3 / 8) / (S + 1 / 4)
Reported maximum of rank-normalised and folded R-hat with its use rule
R_max = max(R_bulk, R_fold); use_draws = (R_max < 1.01) and (S_bulk > 400)
Monte Carlo error as a share of the posterior standard deviation with the 5% guideline
r_MC = e_MC / s_post; ok_MC = (r_MC <= 0.05)
