Skip to contents

Plot catch (in thousands of tonnes) by year, season, and fishery.

Usage

plot_catch(
  fit = NULL,
  object = NULL,
  posterior = NULL,
  proj = NULL,
  probs = c(0.05, 0.95),
  plot_resid = FALSE,
  data = NULL
)

Arguments

fit

An sbt_fit object. Stored MCMC is used by default when the plot supports posterior output.

object

Legacy RTMB objective used only with a legacy data-list input.

posterior

Use NULL to plot the fit's required embedded posterior summary, or FALSE for point estimates only. External posterior objects are not accepted.

proj

A matrix of projected catch values with dimensions matching data$catch_obs_ysf. Default is NULL.

probs

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

plot_resid

A logical value indicating whether to plot the residuals instead of the catch. Default is FALSE.

data

Legacy named alias for a model data list; supply object as well.

Value

A ggplot2 object displaying catch observations and predictions by year, season, and fishery.

Details

The function prints the largest signed observed-minus-predicted catch difference to the console. This is not the largest absolute error.