plot_pairs: Create a pairs plot showing correlations among key parameters...

View source: R/plot-pairs.R

plot_pairsR Documentation

Create a pairs plot showing correlations among key parameters or recruitment deviations against the R0 parameter

Description

Create a pairs plot showing correlations among key parameters or recruitment deviations against the R0 parameter

Usage

plot_pairs(
  model,
  type = c("key", "devs"),
  key_posteriors = NULL,
  key_posteriors_titles = NULL,
  recr = NULL,
  bratio = NULL,
  forecatch = NULL,
  point_color = "royalblue",
  point_alpha = 0.3,
  point_size = 0.05,
  lm_color = "black",
  lm_linetype = "solid",
  lm_linewidth = 1,
  strip_fill_color = "transparent",
  strip_fill_alpha = 0.3
)

Arguments

model

The model output from Stock Synthesis as loaded by create_rds_file().

type

Either "key" or "devs", which describe the type of pairs plot to create. If this is "key", all parameters listed in the key_posteriors argument will be plotted as well as the objective function and recruitment parameters for years listed in recr. If this is "devs", The R0 parameter will be plotted against the recruitment deviation parameters for the years listed in recr

key_posteriors

A list of key posterior names (as regular expressions)

key_posteriors_titles

A list of key posterior titles (pretty names which are meant to be shown on plots)

recr

A vector of the recruitment parameter years to include.

bratio

A vector of years to plot the relative spawning biomass for

forecatch

A vector of years to plot the default harvest catch for. There are forecasts, hence the name

point_color

The color of the scatter plot points

point_alpha

The transparency of the scatter plot points

point_size

Th size of the scatter plot points

lm_color

The color of the regression line found on the scatter plot panels

lm_linetype

The type of the regression line found on the scatter plot panels

lm_linewidth

The width of the regression line found on the scatter plot panels

strip_fill_color

The color to fill in the strip labels (facet labels)

strip_fill_alpha

The transparency for the strip labels (facet labels)

Value

A GGally::ggmatrix() object


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