Home / Tools / Bayesian Output Interpreter

Bayesian Output Interpreter

A brms or rstanarm summary answers two questions at once: what your model believes, and whether the sampler that produced that belief actually worked. Paste summary(fit) and every line gets decoded: the posterior estimates and their credible intervals, then Rhat, the effective sample sizes and any divergences, and finally an honest call on whether the fit is safe to report.

Try a real summary:
Paste summary(fit) here

Copy the whole summary, first line to last, and keep the spacing R printed. If Stan printed warnings underneath it, paste those too and they will be read.

Waiting for a paste

Paste a brms or rstanarm summary to decode it

Or load one of the real model outputs above.

How this is computed
1Nothing is recomputed from your data, because your data is not here. Every number on this page is read out of the text you pasted, and the words around it are chosen from what those numbers say.
2Paste a summary and this fills in with how it was read.
3
4A printed summary holds only marginal summaries, not the posterior draws. So loo(), bayes_R2() and pp_check() cannot be computed from a paste by anyone, and are not attempted here. The one derived figure, P(coefficient > 0), is a normal approximation from the printed mean and standard deviation, is labelled as one, and is withheld for parameters whose printed interval is too skewed to justify it.
The same reading, from the fit object in R

Nothing you paste leaves your browser Every preset is real console output, not a mock-up Free, no sign-up

What a credible interval actually claims

The one place Bayesian output says the thing everybody already thought their intervals said.

A 95% credible interval is a statement about the parameter. Given this model, this prior and this data, there is a 95% probability the parameter lies inside it. You may say that out loud. It is the interpretation almost everyone reaches for on first sight of a confidence interval, and here it is finally the correct one.

A 95% confidence interval claims something different, and it is worth stating fairly rather than as a caricature. It is a statement about the procedure: if you repeated the study many times and built an interval this way each time, 95% of those intervals would cover the true value. That is a coherent and useful guarantee, and for many models the two intervals land in nearly the same place. The frequentist definition is not a mistake or a failure of nerve; it is an answer to a different question, one about the reliability of a method rather than the plausibility of a value.

What you are buying with the credible interval is the direct probability statement. What you are paying is the prior. The interval is conditional on it, so a reader who rejects your prior can reject your interval, which is why weakly informative priors and a stated prior_summary(fit) matter more than they seem to. What you are not buying is a significance test. An interval that excludes zero has no error rate attached and no threshold behind it, and treating the zero-crossing as a verdict quietly reimports the machinery Bayesian inference was supposed to leave behind.

The three numbers that decide whether you have a posterior at all

Before any coefficient means anything, the sampler has to have worked. These are the checks, in the order they matter.

An MCMC summary is unusual among model outputs: half of it is not about your science. Rhat, the effective sample sizes and the divergence count describe whether the algorithm succeeded in drawing from the posterior. If it did not, the estimates above them are not wrong answers about your data, they are answers about a computation that failed, and no amount of careful interpretation rescues them.

CheckWhat it measuresThresholdWhat to do when it fails
RhatBetween-chain variance against within-chain variance. Chains that explored the same region agree, so the ratio sits at 1.> 1.01 is a problem. The old 1.1 rule is far too permissive.More iterations first; then stronger priors; then reparameterize. Length cannot fix geometry.
Bulk_ESSHow many independent draws your autocorrelated draws are worth, in the middle of the posterior.< 400 (roughly 100 per chain) is thin.Raise iter. ESS scales with draws, so doubling iterations roughly doubles it.
Tail_ESSThe same, but in the extremes, which is where your interval endpoints are estimated from.< 400. Check this one if you quote intervals.Raise iter. A healthy Bulk_ESS does not imply a healthy tail.
DivergencesTrajectories that blew up on sharp posterior curvature. Regions the sampler never visited.Any at all deserves attention. They bias the draws.Climb adapt_delta: 0.9, 0.95, 0.99. Past 0.99, reparameterize instead.
TreedepthTrajectories that hit the step cap before they wanted to stop.Costs speed, not correctness.Raise max_treedepth if you need the throughput.

The asymmetry between divergences and treedepth is the one most people miss. Hitting the treedepth cap makes the sampler inefficient, and the draws remain valid. A divergence means the sampler could not follow the posterior into a region and therefore never sampled it, so the draws are systematically wrong about a part of the distribution. Running longer collects more draws from the same distorted picture. That is why divergences come first and why the honest response is often to change the model rather than the settings.

The 80% interval nobody asked for

rstanarm and brms disagree about what to print by default, and the difference is easy to miss.

Run summary(fit) on an rstanarm model and you get columns headed 10%, 50% and 90%. Those are quantiles of the posterior, and the outer two span an 80% central interval. Run summary(fit) on a brms model and you get l-95% CI and u-95% CI, which span 95%. Same idea, different defaults, no warning from either package.

The failure mode is quiet. Someone reads the two outer columns of an rstanarm summary, calls them a credible interval, and writes it into a paper where every reader assumes 95%. The reported interval is narrower than claimed, and the coefficients that appear to clear zero are doing so at a level that would not have survived the wider one. Nothing errors and nothing looks wrong.

If you want the 95% interval from rstanarm, ask for it: posterior_interval(fit, prob = 0.95), or reprint the summary with probs = c(0.025, 0.5, 0.975). And whichever you use, name the level in the sentence where you quote it. This page reads the level off the columns actually present in your paste and says which one it found, rather than assuming.

What a paste cannot tell you

The limits of this page are the limits of the text, and they are worth knowing before you trust any tool that claims otherwise.

A printed summary contains marginal summaries: for each parameter on its own, a mean, a standard deviation and a few quantiles. It does not contain the posterior draws. That single fact bounds everything. Model comparison (loo, waic) needs the pointwise log-likelihood of every draw. bayes_R2 needs the draws. pp_check needs the draws and your data. Any joint statement across two parameters, such as the probability that one coefficient exceeds another, needs their joint posterior, and the summary has thrown away everything about how they covary. None of it is recoverable from this text, by this page or any other.

The one derived number here is P(coefficient > 0), and it comes with conditions. It is computed by treating the marginal posterior as normal with the printed mean and standard deviation. That is a fair approximation for a well-identified regression coefficient with a near-symmetric interval, and it is shown only for those. It is withheld for anything bounded at zero or visibly skewed, such as sigma, a group-level standard deviation, or an rstanarm Sigma[] variance row, where a normal approximation would put credible mass below zero and report a confident number about an impossible value.

Everything else on this page is a reading rather than a calculation. The numbers are yours, copied out of your console with their own precision intact; what is added is what they mean.

Frequently asked questions

What is the difference between a credible interval and a confidence interval?

A 95% credible interval is a statement about the parameter: given this model, this prior and this data, there is a 95% probability the parameter lies inside it. A 95% confidence interval is a statement about the procedure: if you repeated the whole study many times, 95% of the intervals built this way would contain the true value. The frequentist definition is a perfectly coherent answer to a different question, and it is not a mistake. The practical difference is that the credible interval lets you say the thing most people want to say, at the cost of depending on a prior that a reader may not share.

What does Rhat measure and why is 1.01 the threshold?

Rhat compares the variance between your chains with the variance within each chain. If every chain explored the same region, those two quantities agree and Rhat sits at 1. If the chains settled in different places, the between-chain variance is inflated and Rhat rises above 1. The older rule of thumb was 1.1, but Vehtari and colleagues showed in 2021 that 1.1 is far too permissive and recommended 1.01. Above 1.01 the chains disagree about where the posterior is, which makes every estimate in the table unreliable. Fixes, in order: run more iterations, use more informative priors, or reparameterize the model.

What is effective sample size, and why are there two of them in brms?

MCMC draws are autocorrelated: each draw is a near neighbour of the last, so 4000 draws carry less information than 4000 independent ones would. Effective sample size is how many independent draws they are worth. The rule of thumb is at least 400, roughly 100 per chain. brms splits it in two. Bulk_ESS covers the middle of the posterior and governs whether the mean and median are trustworthy. Tail_ESS covers the extremes, which is exactly where your credible interval endpoints live, so a fit can have a healthy Bulk_ESS and still report interval bounds you cannot rely on. rstanarm prints a single n_eff instead, but the distinction still applies.

What is a divergent transition and how do I fix it?

A divergence means the sampler's simulated trajectory blew up, usually in a region where the posterior curves more sharply than the step size can follow. This matters more than it sounds: the sampler is not merely slow there, it is systematically failing to visit that region, so the draws are biased and running longer does not help. The standard response is to raise adapt_delta, which forces a smaller step size: climb from the default 0.8 to 0.9, then 0.95, then 0.99. If divergences survive 0.99, stop climbing. The geometry itself is the problem, and the fix is reparameterization, most often the non-centred form for a hierarchical model.

Why does rstanarm print 10%, 50% and 90% instead of a 95% interval?

Those are rstanarm's default probs, and together they span an 80% central interval, not a 95% one. This trips people up constantly: the numbers look like an interval, readers assume 95%, and the reported interval ends up narrower than claimed. If you want the 95% interval, ask for it: posterior_interval(fit, prob = 0.95), or reprint the summary with probs = c(0.025, 0.5, 0.975). brms prints l-95% CI and u-95% CI by default, so the two packages do not agree out of the box. Always say which level you are quoting.

The credible interval excludes zero. Does that mean the effect is real?

No. It means zero is not among the values the model finds credible at that level, given the prior you chose. It is not a significance test and there is no error rate attached to it. A different prior can move the bound, a wider level can straddle zero, and an interval can clear zero while the effect remains far too small to matter. The interval width tells you how much you know and the estimate tells you whether the effect is worth caring about; whether the interval happens to cross zero is the least informative thing about it. Ranking coefficients by that crossing is a habit imported from significance testing.

Can this page compute LOO, WAIC, Bayes R-squared or a posterior probability?

No, and it will not pretend to. A printed summary contains only marginal summaries of each parameter: the mean, the standard deviation and a few quantiles. It does not contain the posterior draws. Anything that needs the draws, including loo(), waic(), bayes_R2(), pp_check() and any joint probability across two parameters, is simply not recoverable from a paste, and a page that produced one from this text would be making it up. The one exception is deliberately labelled: P(coefficient > 0) is offered as a normal approximation from the printed mean and standard deviation, and it is only shown for coefficients whose printed interval is near enough symmetric to justify it.

Where do the example outputs come from?

The five rstanarm examples are real console output from models fitted on the machine that built this page, captured with print(summary(fit), digits = 3). The exact R and package versions are printed under the trust line above. The badly behaved ones are genuinely badly behaved: the short-run example really was run for 50 iterations and really did produce an Rhat of 2.448, and the divergence example really did diverge 100 times at adapt_delta = 0.40. The brms example is quoted verbatim from the official brms documentation at paulbuerkner.com/brms, because brms compiles each model with a C++ toolchain that this build machine does not have, and inventing a plausible-looking brms summary was not an acceptable substitute.

Go deeper