Skip to contents

Evaluates selected model report quantities over every retained MCMC draw, stores lower, median, and upper posterior summaries inside the portable sbt_fit, and returns the updated fit. A matching existing entry is reused without report evaluation. Plot functions do not create missing summaries.

Usage

add_posterior_summaries(
  fit,
  name = "plots",
  reports = .sbt_plot_summary_reports,
  probs = c(0.025, 0.05, 0.95, 0.975),
  transform = c("plots", "composition", "identity"),
  option = 2L
)

Arguments

fit

An sbt_fit containing MCMC draws.

name

Non-empty name for the embedded summary entry.

reports

Character report names. The composition entry requires lf_pred, cpue_lf_pred, and af_pred together.

probs

Posterior probabilities to store. The median is always added. Defaults cover both the 90% catch interval and the 95% intervals used by the other posterior plots.

transform

"plots" for all standard fit-first plots, "composition" for only the exact composition pooling and normalization rules, or "identity" for untransformed report quantities.

option

Parallelization mode passed to get_posterior().

Value

The updated sbt_fit.