Skip to contents

Plot observed and predicted troll index values with approximate lognormal observation intervals.

Usage

plot_troll(
  fit = NULL,
  object = NULL,
  level = 0.95,
  observed_color = "#D55E00",
  predicted_color = "#0072B2",
  data = NULL,
  posterior = NULL,
  probs = c(0.025, 0.975)
)

Arguments

fit

An sbt_fit object. This diagnostic uses its fitted point estimate.

object

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

level

Numeric confidence level for the approximate observation intervals. The default is 0.95.

observed_color

Color used for observed troll points and intervals.

predicted_color

Color used for the predicted troll line.

data

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

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

Lower and upper posterior interval probabilities.

Value

A ggplot2 object displaying observed and predicted troll index values by year.