What Is R-Hat? (MCMC Diagnostics Guide)
R-hat, or the potential scale reduction factor, compares variation within MCMC chains with variation across chains to flag possible lack of mixing. A modern rank-normalized split-R-hat below 1.01 is a useful screening target, not proof of convergence. Check trace plots, effective sample sizes, and sampler warnings before trusting posterior estimates or reporting results.
MCMC output can look convincing while chains have not explored the same parts of a posterior distribution. R-hat helps identify that problem by comparing multiple chains, but it cannot certify that a model is correct or that every important region was found. I treat it as one part of a diagnostic review, not a pass-or-fail stamp.
The practical goal is to learn whether chains appear to be sampling the same distribution well enough to support the summaries you need. Here is how to calculate and interpret R-hat, what to check alongside it, and what to do when a diagnostic raises concern.
MCMC Diagnostics Overview: What R-hat Measures
R-hat estimates whether multiple chains appear to have similar distributions. It compares variation within each chain with variation between chains; a value near 1 suggests agreement. Modern versions split chains and use rank-based measures to detect differences in location and spread. Agreement is reassuring, but it does not prove convergence.
What does the potential scale reduction factor mean?
The potential scale reduction factor estimates how much a parameter’s uncertainty might shrink if sampling continued. In the original method, R-hat compares within-chain variance, W, with an estimate of overall variance, which includes between-chain variation, B. When chains differ, the estimated overall variance tends to exceed W, so R-hat rises above 1.
In ideal conditions, chains have explored the same target distribution and R-hat approaches 1. But the value is not a direct measure of model quality, accuracy, or certainty. A parameter can have a low R-hat and still have too few effective samples for a precise estimate.
Why is modern R-hat rank-normalized and split?
Modern R-hat addresses weaknesses in the original calculation. Splitting each chain in half makes it easier to detect changes over time within a chain. Rank normalization reduces sensitivity to the scale and shape of a parameter’s values, including heavy tails. A folded version can reveal differences in spread that a location-focused comparison might miss.
When available, use rank-normalized split-R-hat, including its folded check. Software may report a combined value based on the rank-normalized and folded versions. Check the documentation for the package and version you use, since output labels and implementations can vary.
Computational Requirements: Chains, Splitting, and Diagnostic Criteria
A useful R-hat calculation needs several chains sampling the same model, not repeated summaries of one chain. Start with at least four independently initialized chains and valid starting values spread across plausible parameter regions. Then inspect split, rank-normalized diagnostics and chain behavior before deciding whether the output is usable.
How many chains do I need?
Run at least four chains when practical. Initialize them independently, using valid starting values that are dispersed enough to reveal whether the sampler reaches different regions. Starting values must still satisfy the model’s constraints; a deliberately invalid start does not make the diagnostic stronger.
A chain is a sequence of draws produced by an MCMC sampler. For split-R-hat, software divides each chain into two segments and treats those segments as separate chains. This lets the diagnostic compare not only original chains with one another, but also earlier and later parts of each chain.
What R-hat threshold should I use?
Use rank-normalized split-R-hat below 1.01 as a modern screening target. A value at or above 1.01 is a reason to investigate, not an automatic verdict that the model has failed. The older rule of thumb, R-hat below 1.1, is much less strict and should not be treated as sufficient evidence of convergence.
| Diagnostic result | Practical reading | Next step |
|---|---|---|
| Rank-normalized split-R-hat < 1.01 | Chains pass this screening check | Check ESS, plots, and sampler warnings |
| R-hat ≥ 1.01 | Chains may differ in location or spread | Inspect affected parameters and chain behavior |
| R-hat near 1, but low ESS | Agreement does not ensure precise estimates | Run longer or improve sampling, then recheck |
| R-hat near 1, but divergences remain | A sampler warning remains unresolved | Investigate the model and sampler before relying on results |
How do I calculate R-hat in software?
Use a current statistics package that supports rank-normalized split-R-hat. For example, with draws stored in a format accepted by the R posterior package, you can calculate R-hat and effective sample sizes:
posterior::rhat(draws)
posterior::ess_bulk(draws)
posterior::ess_tail(draws)
Confirm that draws contains multiple chains and that the package recognizes its chain structure. If you use another package, consult its documentation to verify which R-hat variant it reports. Do not assume a function named rhat automatically calculates the modern rank-normalized split version.
Diagnostic Practice: Mixing, ESS, and Troubleshooting
R-hat is most useful when paired with visual and numerical checks. Review trace plots for overlap, stability, and adequate exploration, then inspect bulk and tail effective sample sizes. If chains disagree or a sampler reports warnings, find the cause and rerun diagnostics after making a change.
What should trace plots show?
A trace plot displays draws in the order they were sampled. Look for chains that overlap and move through the same range without persistent separation or long periods of sticking. Also look for changes in behavior over time, such as a chain shifting to a new level late in the run.
A plot that looks like a dense, stable band is not proof of convergence. A chain can appear steady while missing an important region shared by no other chain. Use plots with R-hat, ESS, and sampler-specific checks rather than relying on appearance alone.
What do bulk and tail ESS tell me?
Effective sample size, or ESS, estimates how many independent draws would provide similar information to your correlated MCMC draws. Bulk ESS focuses on the central part of a distribution and is useful for many posterior summaries. Tail ESS focuses on the tails, which matter for quantiles and interval endpoints.
There is no single ESS target that suits every analysis. Set requirements based on the precision needed for the estimates you plan to report, such as a mean, a tail probability, or a high posterior quantile. A low R-hat does not make a low ESS harmless.
How should I troubleshoot a concerning result?
Start with the parameters showing high R-hat, low ESS, or unusual traces. Check whether the issue reflects poor mixing, strong dependence among parameters, a difficult posterior shape, or a model or data problem. For Hamiltonian Monte Carlo, review divergences and other sampler warnings; unresolved divergences can signal that some parts of the posterior are not being explored reliably.
Possible responses include reparameterizing the model, reviewing priors and constraints, or adjusting sampler settings where appropriate. Make changes for a reason, then rerun and check all diagnostics again. Do not simply extend sampling or stop because R-hat has fallen near 1.
Illustrative diagnostic case
Consider a model with four chains. Three chains explore a similar range, while the fourth stays in a separate region. Its parameter may show R-hat above 1.01 and a trace plot that does not overlap with the others. That pattern calls for investigation, not immediate reporting of the posterior summary.
In a second possible outcome, all four chains overlap and R-hat is below 1.01, but tail ESS is low and the sampler reports divergences. The chains have passed one screening check, yet tail estimates and sampling behavior remain concerning. In both cases, I would identify the affected quantities, investigate the model or sampler, and rerun the full diagnostic review.
Interpretation and Reporting: Limits, Reproducibility, and Inference
R-hat describes agreement among the chains you ran; it does not establish that those chains found every important part of the posterior. Report it with its method, ESS, and relevant sampler warnings. State any unresolved limits before interpreting estimates, especially when chains appear stuck or diagnostic problems remain.
Can R-hat be near 1 and still mislead me?
Yes. If all chains fail to explore the same important region, they can agree with one another and still miss relevant posterior behavior. Chains can also share a common sampling problem. R-hat near 1 therefore cannot prove that a model has converged or that its results are trustworthy.
This is why independent initialization, trace plots, ESS, and sampler-specific diagnostics matter. Treat a favorable R-hat as evidence that chains passed one check, not as permission to ignore other evidence.
What should I report?
Record the R-hat method and results, the number of chains, and the bulk and tail ESS for reported quantities. Include relevant sampler warnings, such as unresolved divergences, and describe any steps taken to address them. These details help readers understand what you checked and what remains uncertain.
For reproducibility, also document the model and software details needed to understand the sampling run. If a parameter still has problematic diagnostics, say so clearly rather than presenting its estimate as settled. Interpret posterior results only in light of the diagnostics and limitations.
Frequently Asked Questions
The answers below address common decisions about R-hat in applied MCMC work. They focus on how to read the diagnostic, when to investigate, and what other evidence to review. No single threshold or statistic can replace a full check of chain behavior and sampling quality.
What is a good R-hat value?
A rank-normalized split-R-hat below 1.01 is a commonly used modern screening target. It means the chains pass that check; it does not prove convergence or ensure precise estimates. Also review trace plots, ESS, and sampler warnings.
Is R-hat below 1.1 good enough?
Not by itself. The older 1.1 threshold is comparatively permissive and can miss problems that a stricter screen may flag. Use the modern target below 1.01 where available, along with other diagnostics.
Why are multiple MCMC chains needed?
R-hat compares within-chain and between-chain variation, so it needs multiple chains to assess whether their behavior agrees. At least four independently initialized chains are a useful practical recommendation. Multiple chains also help reveal when runs settle in different regions.
Should I split my chains before calculating R-hat?
Use a method that calculates split-R-hat, rather than assuming an unsplit calculation is enough. Splitting compares the earlier and later portions of each chain, which can help expose changes in behavior. Many current diagnostic tools perform this step automatically.
What does R-hat greater than 1 mean?
It indicates some difference between within-chain and between-chain variation. A value at or above 1.01 deserves investigation under the modern screening target. Inspect affected traces and other diagnostics to understand whether chains mix poorly or behave differently over time.
Can I stop sampling when R-hat is 1?
No. A value near 1 does not show that estimates are precise or that chains explored all important regions. Check bulk and tail ESS, trace plots, and sampler warnings before deciding whether more sampling or model changes are needed.
What is the difference between R-hat and ESS?
R-hat checks whether chains appear to agree with one another. ESS estimates the information in correlated draws relative to independent draws. A run can have R-hat near 1 but low ESS, so estimates may still lack the precision needed.
What should I do if there are divergences?
Treat unresolved divergences as a diagnostic concern, even if R-hat is near 1. Review affected parameters and model geometry, then consider whether reparameterization, prior choices, or sampler settings need attention. Rerun the analysis and check the diagnostics again before interpreting results.
(This article was written by one of our staff writers, Nathan Sterling. Visit our Meet the Team page.)
