Skip to contents
  • Sampler-only core: strictly restrict AE/CE (and related "sampled" panels) to targets having an MCMC sampler, discovered inside via conf.mcmc$getSamplers() (or attr(diag_tbl,"mcmc_conf"), or explicit attr(diag_tbl,"sampled_targets")). No "Family" logic anywhere.

  • All-nodes replacements (this change): replace the former sampled-only panels you listed with all-nodes counterparts for the same metrics:

    • AE median by Target - all nodes (steelblue)

    • CE median by Target - all nodes (green)

    • Worst CE - all nodes (grey60 + labels)

    • Top Time - all nodes (grey40 + labels)

Usage

plot_bottlenecks_index(
  diag_tbl,
  out_dir = "outputs/diagnostics",
  top_k = 20L,
  n_worst = 20L,
  bins = 30L,
  rhat_ref = 1.05,
  make_bar_ae_median_all = TRUE,
  make_bar_ce_median_all = TRUE,
  make_bar_ce_worst_all = TRUE,
  make_bar_rhat_worst = TRUE,
  make_bar_ess_q5 = TRUE,
  make_hist_ce = TRUE,
  make_hist_ae = TRUE
)

Arguments

diag_tbl

data.frame with per-target diagnostics; must contain target or rownames. Expected: AE (AE_ESS_per_it or AE), CE (ESS_per_sec or ess_per_s or CE); optional ESS/ess, time_s, Rhat.

out_dir

Output directory for figures (PDF + PNG). Default: "outputs/diagnostics".

top_k

Bars shown in the "worst/top" all-nodes panels. Default: 20L.

n_worst

Rows returned in worst tables. Default: 20L.

bins

Kept for API compatibility (AE/CE "hist" are barplots). Default: 30L.

rhat_ref

Rhat reference (Rhat-1 axis). Default: 1.05.

make_bar_ae_median_all,

make_bar_ce_median_all, make_bar_ce_worst_all, make_bar_time_top_all Toggles for the all-nodes panels (default TRUE).

make_bar_ce_median_all

Logical; if TRUE, draw CE median bars over all nodes.

make_bar_ce_worst_all

Logical; if TRUE, draw bars for worst CE nodes.

make_bar_rhat_worst,

make_bar_ess_q5, make_hist_ce, make_hist_ae Toggles for the existing sampled-only panels (default TRUE).

make_bar_ess_q5

Logical; if TRUE, draw bars for 5\ quantiles.

make_hist_ce

Logical; if TRUE, include CE histograms.

make_hist_ae

Logical; if TRUE, include AE histograms.

Value

Invisibly, a list with ggplot objects and worst-node tables.