Skip to contents

Plot length frequency (LF) fit.

Usage

plot_lf(
  data,
  object,
  posterior = NULL,
  probs = c(0.025, 0.975),
  years = NULL,
  fishery = "LL1",
  ...
)

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.

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).

years

A numeric vector of years to plot. If NULL (default), all years are plotted.

fishery

A character string specifying the fishery to plot. Options are "LL1", "LL2", "LL3", or "LL4". Default is "LL1".

...

Additional parameters passed on to facet_wrap.

Value

A ggplot2 object displaying observed and predicted length frequencies by year.