plot_age_resids_boxes_mcmc: Plot MCMC age residuals for an iSCAM model

View source: R/plot-age-resids-boxes-mcmc.R

plot_age_resids_boxes_mcmcR Documentation

Plot MCMC age residuals for an iSCAM model

Description

Plot MCMC age residuals for an iSCAM model

Usage

plot_age_resids_boxes_mcmc(
  model,
  gear = 1,
  type = c("age", "year", "birth_year"),
  probs = c(0.025, 0.5, 0.975),
  comp_color = "black",
  comp_point_size = 0.5,
  ci_type = c("both", "line", "ribbon"),
  ci_linetype = c("dotted", "solid", "dashed", "dotdash", "longdash", "twodash"),
  ci_color = "red",
  ci_alpha = 0.3,
  ylim = c(-3, 3),
  text_title_size = 12,
  text_title_inc_mdl_nm = FALSE,
  leg_loc = c(1, 1),
  angle_x_labels = FALSE
)

Arguments

model

An iscam model object (class mdl_cls)

gear

The number of the gear to plot

type

One of "age", "year", or "birth_year"

probs

Probability values to use in the plots

comp_color

Color for the age comp data lines and points

comp_point_size

Size of the age composition points

ci_type

One of "both" or "line", type of confidence interval

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"

ylim

The y-axis limits (vector of 2)

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)

leg_loc

Legend location (vector of 2)

angle_x_labels

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

Value

A ggplot2::ggplot() object

See Also

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


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