Skip to contents

Plot fit to tagging observations.

Usage

plot_tags(
  fit = NULL,
  object = NULL,
  posterior = NULL,
  probs = c(0.025, 0.975),
  years = NULL,
  fishery = "Indonesian",
  data = NULL,
  ...
)

Arguments

fit

An sbt_fit object. Its stored MCMC is used by default.

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.

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 recapture years to plot. If NULL (default), all years are plotted.

fishery

Deprecated and ignored. Tag recaptures are indexed by release cohort, tagger, release age, and recapture age rather than fishery.

data

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

...

Additional parameters passed on to facet_wrap.

Value

A ggplot2 object displaying observed and predicted tag recaptures by release group and recapture year.

Examples

fit <- sbt_example_fit()
#> Warning: Dependency versions differ: RTMBdist, TMB
#> Warning: Dependency versions differ: RTMBdist, TMB
plot_tags(fit, posterior = FALSE, ncol = 4)
#> `geom_line()`: Each group consists of only one observation.
#>  Do you need to adjust the group aesthetic?
#> `geom_line()`: Each group consists of only one observation.
#>  Do you need to adjust the group aesthetic?
#> `geom_line()`: Each group consists of only one observation.
#>  Do you need to adjust the group aesthetic?
#> `geom_line()`: Each group consists of only one observation.
#>  Do you need to adjust the group aesthetic?
#> `geom_line()`: Each group consists of only one observation.
#>  Do you need to adjust the group aesthetic?
#> `geom_line()`: Each group consists of only one observation.
#>  Do you need to adjust the group aesthetic?