plot_age_fits_mcmc: Plot MCMC age fits for an iSCAM model

View source: R/plot-age-fits-mcmc.R

plot_age_fits_mcmcR Documentation

Plot MCMC age fits for an iSCAM model

Description

Plot MCMC age fits for an iSCAM model

Usage

plot_age_fits_mcmc(
  model,
  gear = 1,
  yrs = NULL,
  comp_color = "black",
  comp_width = 0.5,
  comp_alpha = 0.5,
  ci_linetype = c("dotted", "solid", "dashed", "dotdash", "longdash", "twodash"),
  ci_color = "red",
  ci_alpha = 0.3,
  text_title_size = 12,
  text_title_inc_mdl_nm = FALSE,
  angle_x_labels = FALSE,
  show_sample_size_f_only = TRUE,
  sample_size_x = 17,
  sample_size_y = 0.2
)

Arguments

model

An iscam model object (class mdl_cls)

gear

The number of the gear to plot

yrs

A vector of years to include in the plot. If the maximum extends past the range of years in the data, the maximum in the data will be used. If NULL, all years will be included

comp_color

Color for the age comp data lines and points

comp_width

Age comp bar widths

comp_alpha

Age comp bar alpha value (0-1)

ci_linetype

See linetype in ggplot2. Only used if ci_type is "line" or "both"

ci_color

Color for the lines or ribbon for the credible intervals

ci_alpha

Opacity between 0 and 1 for the credible intervals ribbons. Only used if ci_type is "ribbon" or "both"

text_title_size

Size of text for the axis titles

text_title_inc_mdl_nm

Logical. If TRUE, make the model name the main title and the gear the subtitle. If FALSE, do not show the model name, and make the gear the main title (if text_title_size is NULL, no title will be shown)

angle_x_labels

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

show_sample_size_f_only

If TRUE, show the sample size in the female panels only. If FALSE, show the sample size in both male and female panels. Included for cases where the sample size is shared or repeated for both sexes.

sample_size_x

The x value (age) to place the sample size label

sample_size_y

The y value (0-1) to place the sample size label

Value

A ggplot2::ggplot() object

See Also

Other Age plotting functions: plot_age_fits_mpd(), plot_age_resids_boxes_mcmc(), plot_age_resids_mcmc(), plot_age_resids_mpd()


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