Skip to contents

Plot recruitment by year.

Usage

plot_recruitment(data, object, posterior = NULL, probs = c(0.025, 0.975))

Arguments

data

A list containing data passed to MakeADFun, must contain first_yr and last_yr.

object

A list specifying the AD object created using MakeADFun.

posterior

An snutsfit/tmbfit object or NULL containing optional posterior samples created using tmbstan or sample_sparse_tmb (default NULL).

probs

A numeric vector of probabilities with values in \[0,1\] for plotting quantiles of the posterior distribution (default c(0.025, 0.975)).

Value

A ggplot2 object showing recruitment over time.