Skip to contents

Plot natural mortality (M) by age.

Usage

plot_natural_mortality(
  fit = NULL,
  object = NULL,
  posterior = NULL,
  probs = c(0.025, 0.975),
  color = "#00BFC4",
  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 probabilities with values in [0,1] for plotting posterior quantiles. The default is c(0.025, 0.975).

color

Color used for the maximum-likelihood natural-mortality line and points.

data

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

Value

A ggplot2 object showing natural mortality by age with MLE values and optional posterior medians and credible intervals. For the direct model, colored markers identify M0, M4, M10, and M30. For the length-based model, they identify only its fitted controls, M10 and M30.