plot_historical_probs: Plots to compare historical and current probabilities

View source: R/plot-historical-probs.R

plot_historical_probsR Documentation

Plots to compare historical and current probabilities

Description

Plot either: (a) base model's estimate of P(B_t+1 < B_t) and compare with the estimate of that from the year t assessment (using the known catch in year t) (b) base model's estimate of P(B_t+1 < B_40%) and compare with the estimates of that from the year t assessment (using the known catch in year t). Included in management presentation.

Usage

plot_historical_probs(
  model,
  hist_probs,
  type = "decline",
  end = assess_yr - 1,
  xLim = NULL,
  add.50 = TRUE,
  add.50.col = "darkgrey",
  one.year = 2019,
  add.projs = FALSE,
  num.projs = ct_levels_num,
  colors = c("red", "blue"),
  pch = c(16, 17),
  lwd.val = 1,
  legend.cex = 1,
  legend.loc = "bottomright",
  main.title = NULL,
  legend.text = c("From year t's assessment", "From current base model"),
  legend.inset = c(0, 0),
  add.to.plot = FALSE,
  ...
)

Arguments

model

A model object, created by create_rds_file()

hist_probs

A data frame containing the data found in assessment-history-probs.csv

type

"decline" to show probs of spawning biomass declining in year after historical assessment year, "decline_one_year" to show that for just one year (to explain in a talk), "bforty" to show prob of being below ⁠B_40\\%⁠ in the year after the historical assessment year

end

final year for calculations

xLim

range of x (years) axis

add.50

Whether to add horizontal line at 50%

add.50.col

Color for 50% line

one.year

A single year to plot (may automatically work for more years)

add.projs

Whether to add future projections from current base model

num.projs

Number of projection catch levels to show

colors

The colors to use for the lines in the plot

pch

change legend call also if change this

lwd.val

Line width

legend.cex

Legend font size

legend.loc

Legend location

main.title

Main title text

legend.text

Legent title text

legend.inset

Vector for how much to shift the legend, gets parsed to legend( , inset) value, so see ?legend. Will depend on figure size.

add.to.plot

whether to add to an existing plot

...

Arguments passed to combine_historical_probs()

Value

A base R plot


pacific-hake/hake-assessment documentation built on Jan. 14, 2025, 9:12 p.m.