plot_biomass_mcmc: Plot MCMC biomass for iSCAM models

View source: R/plot-biomass-mcmc.R

plot_biomass_mcmcR Documentation

Plot MCMC biomass for iSCAM models

Description

Plot the MCMC spawning biomass trajectories for iscam models in either absolute or relative form with or without reference point credible intervals and medians

Usage

plot_biomass_mcmc(
  models,
  rel = FALSE,
  show_bo = TRUE,
  probs = c(0.025, 0.5, 0.975),
  refpts_ribbon = TRUE,
  refpts_alpha = 0.2,
  bo_dodge = 0.1,
  x_space = 0.5,
  y_space = ifelse(rel, 0.05, 0.5),
  show_bo_lines = FALSE,
  bo_refpts = c(0.2, 0.4),
  show_bmsy_lines = FALSE,
  bmsy_refpts = c(0.4, 0.8),
  bo_refpt_colors = c("red", "green"),
  bmsy_refpt_colors = c("salmon", "darkgreen"),
  angle_x_labels = FALSE,
  ylim = NULL,
  line_width = 1,
  point_size = 2,
  units = c("kt", "1000 t"),
  ...
)

Arguments

models

A list of iscam model objects (class mdl_lst_cls)

rel

Logical. Make plot relative to initial estimate (B0), also known as depletion

show_bo

Logical. If TRUE and rel == FALSE, show the median initial value on the plot (B0) as a point with the credible intervals as bars

probs

A 3-element vector of probabilities that appear in the output data frames. This is provided in case the data frames have more than three different quantile levels

refpts_ribbon

Logical. If TRUE, make the first model's reference points lines (show_bo_lines and/or show_bmsy_lines must be TRUE) plotted an envelope of the credible interval, surrounding the median lines for the reference points

refpts_alpha

The transparency of the envelope shown for reference points between 0 and 1. Only used when refpts_ribbon is TRUE and show_bo_lines and/or show_bmsy_lines are TRUE

bo_dodge

The amount to offset the initial value (B0 or R0) values from each other so the values and uncertainty can be easily seen for multiple models

x_space

The amount of x-interval space to pad the left and right of the plot with. To remove all padding, make this 0

y_space

The amount of y-interval space to pad the top and bottom of the plot with. To remove all padding, make this 0

show_bo_lines

Show the B0 lines at values given by bo_refpts for the first model in the models list

bo_refpts

Vector of two proportional values for the limit reference point and Upper stock reference. Values are 0.2B0 and 0.4B0 by default

show_bmsy_lines

Show the BMSY lines at values given by bmsy_refpts for the first model in the models list

bmsy_refpts

Vector of two proportional values for the limit reference point and Upper stock reference. Values are 0.4BMSY and 0.8BMSY by default

bo_refpt_colors

A vector of two colors representing the LRP and USR for B0. Used to display reference point lines if show_bo_lines is TRUE

bmsy_refpt_colors

A vector of two colors representing the LRP and USR for BMSY. Used to display reference point lines if show_bmsy_lines is TRUE

angle_x_labels

If TRUE put 45 degree angle on x-axis tick labels

ylim

A vector of two values, representing the minimum and maximum values for the plot on the y-axis. If NULL, defaults will be zero for the minimum and the ceiling of the maximum value (including CI)

line_width

Width of all median lines on the plot

point_size

Point size for all median points on the plot

units

One of "1000 t" or "kt". The text that will appear in the y-axis label. The "1000 t" text will be changed to "1,000 t" or "1 000 t" for English or French respectively

...

Arguments passed to plot_ts_mcmc()

Details

The reference point lines and credible intervals are output from the first model in the list, as such they cannot be used to judge the other model's status with respect to reference points. To see those, plot with plot_biomass_grid_mcmc() instead. This will show one panel per model, each with its own reference points.

See Also

Other Time series plotting functions: plot_biomass_grid_mcmc(), plot_biomass_mpd(), plot_biomass_proj_mcmc(), plot_catch_fit_mcmc(), plot_f_mcmc(), plot_index_mcmc(), plot_index_mpd(), plot_q_mcmc(), plot_rdevs_mcmc(), plot_recr_grid_mcmc(), plot_recr_mcmc(), plot_recr_mpd(), plot_ts_mcmc(), plot_vuln_mcmc()


pbs-assess/gfiscamutils documentation built on Oct. 24, 2024, 1:37 p.m.