Skip to contents

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

Usage

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

Arguments

data

A list containing the data that was passed to MakeADFun.

object

A list specifying the AD object created using MakeADFun.

posterior

An rstan object created using the tmbstan function for Bayesian inference. Default is NULL.

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.

Value

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