Stage 4: Computation and Sampler

Objective

Decide whether the posterior draws are numerically trustworthy.

This stage is about computation quality, not business interpretation and not causal validity. If it fails, every downstream quantity that depends on posterior draws becomes unreliable.

The key question

Before asking whether the model is good, ask whether the sampler actually explored the posterior well enough for the summaries to mean what they appear to mean.

In DSAMbayes, this is the stage where you care most about:

  • divergences
  • Rhat
  • effective sample size
  • treedepth and BFMI when available

1. Divergences

Any non-zero divergences should be treated seriously. They are often the strongest sign that the sampler struggled with posterior geometry.

Typical actions:

  • increase adapt_delta
  • simplify the model
  • revisit boundaries or extreme prior choices
  • inspect whether a hierarchical structure is too ambitious for the data

2. Rhat

Rhat answers: did the chains mix into the same posterior region?

Practical rule:

  • at or below 1.01 is the target
  • above 1.01 fails the publish and strict diagnostics policies

3. Effective sample size

ESS answers: how much independent information do the posterior summaries really contain after accounting for autocorrelation?

Low ESS means:

  • interval estimates may be unstable
  • tail probabilities may be noisy
  • apparent posterior precision may be misleading

4. Treedepth and BFMI

These are geometry warnings. They often indicate a difficult posterior shape even when Rhat looks acceptable.

What DSAMbayes gives you

You can inspect this stage through:

  • chain_diagnostics(model) for interactive fitted models
  • 40_diagnostics/diagnostics_report.csv
  • 40_diagnostics/diagnostics_summary.txt
  • diagnostics plots and residual artifacts produced by the runner

The threshold reference lives in Diagnostics Gates. The task-oriented post-run triage guide lives in Interpret Diagnostics.

Minimal decision rule

Status Interpretation
pass Posterior draws are numerically acceptable for the configured policy mode
warn The run may still be usable, but the warning must be understood and disclosed
fail Do not use decomposition, optimisation, or reporting outputs for business decisions

What Stage 4 does not tell you

Passing Stage 4 does not mean:

  • the model fits the data well
  • the residual structure is acceptable
  • the decomposition is substantively meaningful
  • the media effects are causally identified

It only means the sampler did a credible job approximating the posterior of the model you gave it.

Common mistake

The most common analytical error is to stop at Stage 4 and say “the model converged, so we can trust the answer.”

That is wrong.

Convergence tells you the computation is trustworthy. It does not tell you the model is adequate. That is the next stage.

What to do if Stage 4 fails

Start with the least cosmetic explanation:

  1. Is the model too complicated for the data?
  2. Is the baseline structure poorly separated from media?
  3. Are priors or boundaries too aggressive?
  4. Are hierarchical or pooled structures under-informed?

Only after that should you reach for sampler tuning.