{
  "name": "Stan diagnostic thresholds mapped to rstan output",
  "description": "Thresholds from the Stan team's convergence and runtime-warning guidance, paired with the rstan output column or sampler parameter where each quantity appears. Compiled from the Stan diagnostics guide and the RStan vignette; each row states the threshold as the guide gives it.",
  "page": "https://casrai.org/guides/rstan",
  "publisher": "CASRAI",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "dateModified": "2026-11-16T22:01:46Z",
  "temporalCoverage": null,
  "spatialCoverage": null,
  "columns": [
    {
      "name": "Diagnostic",
      "unit": "",
      "description": ""
    },
    {
      "name": "Where it appears in rstan",
      "unit": "",
      "description": ""
    },
    {
      "name": "Threshold or rule in the Stan guide",
      "unit": "",
      "description": ""
    },
    {
      "name": "How the guide treats it",
      "unit": "",
      "description": ""
    }
  ],
  "rows": [
    {
      "Diagnostic": "R-hat",
      "Where it appears in rstan": "Rhat column of print(fit)",
      "Threshold or rule in the Stan guide": "Below 1.01 for a final result; below 1.1 often enough early",
      "How the guide treats it": "Run at least 4 chains"
    },
    {
      "Diagnostic": "Effective sample size",
      "Where it appears in rstan": "n_eff column of print(fit)",
      "Threshold or rule in the Stan guide": "Bulk-ESS above 100 times the number of chains (400 for 4 chains) for a final result; above 20 early",
      "How the guide treats it": "The RStan vignette calls n_eff a crude measure of effective sample size"
    },
    {
      "Diagnostic": "Divergent transitions",
      "Where it appears in rstan": "divergent__ in get_sampler_params; red points in pairs()",
      "Threshold or rule in the Stan guide": "Divergences after warmup cannot be safely ignored",
      "How the guide treats it": "Reparametrize or use stronger priors; adapt_delta is a last resort and above 0.99 seldom useful"
    },
    {
      "Diagnostic": "Maximum treedepth",
      "Where it appears in rstan": "treedepth__ in get_sampler_params",
      "Threshold or rule in the Stan guide": "Default limit 10; values of max_treedepth above 12 seldom useful",
      "How the guide treats it": "An efficiency issue, not a validity issue; likely safe to ignore if ESS and R-hat are good"
    },
    {
      "Diagnostic": "E-BFMI",
      "Where it appears in rstan": "energy__ in get_sampler_params",
      "Threshold or rule in the Stan guide": "Nominal threshold 0.3",
      "How the guide treats it": "Listed in the guide among the sampler diagnostics"
    }
  ],
  "sources": [
    {
      "title": "Stan: Runtime warnings and convergence problems",
      "url": "https://mc-stan.org/learn-stan/diagnostics-warnings.html",
      "accessed": "2026-11-14"
    },
    {
      "title": "RStan vignette",
      "url": "https://mc-stan.org/rstan/articles/rstan.html",
      "accessed": "2026-11-14"
    }
  ]
}