Diagnostic plots for an rceattle_osa object (from osa_residuals()),
following the recommendations of Stewart and Monnahan (2025) and the styling
of the NOAA-AFSC afscOSA package. Under a correctly specified model OSA
residuals are iid standard normal, so the headline diagnostic is statistical
(the Q-Q plot with its annotated SDNR / tail statistics).
Up to two separate figures are drawn, depending on which data are present:
Aggregate (
index/catch): a Q-Q panel faceted by data source. These series have no age/length bin, so no bubble plots are drawn.Composition (
comp/caal): a Q-Q panel, a signed OSA-residual bubble panel, and a signed Pearson-residual bubble panel (the Pearson residuals carried on therceattle_osaobject). By default age-based bins (age composition and conditional age-at-length) are shown in the left column and length-based bins in the right column, each with its own bin axis; setcombine = FALSEto draw the age and length composition as two separate figures instead (useful when a model has many fleets/species).
Panel headers use the fleet name from fleet_control. Process residuals
(from process_residuals()) are drawn as a Q-Q panel plus a
residual-by-year panel.
Usage
# S3 method for class 'rceattle_osa'
plot(x, source = "all", species = NULL, combine = TRUE, ...)Arguments
- x
An
rceattle_osaobject fromosa_residuals()orprocess_residuals().- source
Data source(s) to plot: any of
"index","catch","comp","caal","diet", or"all"(default). Mirrors thesourceargument ofresiduals.Rceattle(); filters which figures are produced.- species
Optional species code(s) to include (matched against the
speciescolumn). DefaultNULLkeeps all species.- combine
Logical. When
TRUE(default), age and length composition share one figure (age in the left column, length in the right). WhenFALSE, they are drawn as separatecomposition_age/composition_lengthfigures.- ...
Unused.
Value
Invisibly, a named list of the assembled ggplot / cowplot
objects (some of aggregate, composition / composition_age /
composition_length, and process). Called for its side effect of drawing
the plot(s).