Comp.plots: Plots of age- and length-composition fits

View source: R/Comp.plots.r

Comp.plotsR Documentation

Plots of age- and length-composition fits

Description

The function Comp.plots generates bubble plots of residuals of age- and length-composition fits for the entire time frame of the assessment. Bubble areas are scaled to the largest residual within each plot. Optionally, a small inset plot displays the correlation or angular deviation between observed and predicted values each year. In addition, Comp.plots generates plots of predicted and observed mean compositions pooled across years and weighted by sample size.

Usage

Comp.plots(
  x,
  DataName = deparse(substitute(x)),
  draft = TRUE,
  graphics.type = NULL,
  use.color = TRUE,
  units = x$info$units.length,
  resid.type = "OSA",
  corr = TRUE,
  c.min = 0.25,
  max.bub = 1.5,
  b.plot = FALSE,
  resid.plots = FALSE,
  Nyrs = FALSE
)

Arguments

x

an R list with output from the assessment models.

DataName

string used in plot titles. Defaults to argument x.

draft

modifies plots for use in a report. When FALSE main titles are omitted.

graphics.type

a vector of graphics file types to which graphics are saved. When NULL, no plots are saved.

use.color

plots are made in grayscale when FALSE

units

a character string (e.g. "cm") for labeling the X-axis of length-composition plots.

resid.type

type of residuals to plot for in each of the diagnostics, options are "OSA","standard","pearson", and "all". Input can be a single value or vector of values

corr

when FALSE, angular deviation is displayed in the inset plot; otherwise, correlations.

c.min

lower bound on the y-axis range of the inset plot, applies only when corr is TRUE

max.bub

cex value for maximum bubble size, default is 1.5.

b.plot

create boxplots of composition residusls, default is FALSE.

resid.plots

create qqplot and scatterplot of residuals, default is FALSE.

Nyrs

boolean for whether the number of pooled years is to be added to legend. Default is FALSE

Value

Graphics

Author(s)

M Prager

E Williams

K Shertzer

R Cheshire

K Purcell

Examples


Comp.plots(gag)


rcheshire/FishGraph documentation built on Aug. 17, 2024, 5:34 p.m.