Skip to contents

Plot total reproductive output or relative total reproductive output by year for a single model run, a grid of model runs, or an MCMC.

Usage

plot_biomass_spawning(
  fit = NULL,
  object_list = NULL,
  posterior = NULL,
  probs = c(0.025, 0.975),
  relative = TRUE,
  labels = NULL,
  check = TRUE,
  data_list = NULL
)

Arguments

fit

An sbt_fit object or list of sbt_fit objects.

object_list

Legacy RTMB objective or list of objectives used only with data_list.

posterior

Use NULL to plot required embedded summaries from the supplied fits, or FALSE for point estimates only. External posterior objects are not accepted.

probs

A numeric vector of length 2 with probabilities in [0,1] for plotting quantiles of the posterior distribution. Default is c(0.025, 0.975).

relative

A logical value indicating whether to plot relative total reproductive output (relative to B0). Default is TRUE.

labels

A character vector of labels for the model runs. If NULL (default), numeric labels are used.

check

Logical. If TRUE, run check_abundance and warn when any model has non-positive or non-finite abundance. Default is TRUE.

data_list

Legacy model data list or list of model data lists.

Value

A ggplot2 object displaying total reproductive output trajectories by year and model.

Examples

fit <- sbt_example_fit()
#> Warning: Dependency versions differ: RTMBdist, TMB
#> Warning: Dependency versions differ: RTMBdist, TMB
plot_biomass_spawning(fit, posterior = FALSE, relative = TRUE)