Skip to contents

Produce a bar plot showing the median Effective Sample Size (ESS) for each parameter family. A horizontal dashed line indicates the 5 percent quantile of ESS across all families.

Usage

plot_family_ess_bar(
  samples,
  runtime_s,
  sampler_params = NULL,
  model = NULL,
  mcmc_conf = NULL,
  samplers_df = NULL,
  ignore_patterns = c("^lifted_", "^logProb_"),
  strict_sampler_only = TRUE
)

Arguments

samples

An object that can be converted to an mcmc.list (e.g., mcmc.list, mcmc, data.frame, or matrix).

runtime_s

Numeric scalar giving the total runtime in seconds. This value is not used directly inside the plot, but is kept for API consistency.

sampler_params

Optional character vector; if supplied, only parameters listed here are used when computing family-level ESS.

model

A nimbleModel.

mcmc_conf

Optional MCMC configuration; if NULL, one is built.

samplers_df

Optional data.frame describing samplers (type/target).

ignore_patterns

Optional character vector of patterns to exclude some families.

strict_sampler_only

Logical; if TRUE, only nodes actually sampled are considered.

Value

A ggplot object representing median ESS per family.

Details

Families are defined by the substring before the first "[" in each parameter name. If sampler_params is provided, only parameters included in that vector are used when forming families.