plotDiagCU: Diagnostic plot

View source: R/plotDiagnostics.R

plotDiagCUR Documentation

Diagnostic plot

Description

This function generates diagnostic figures showing CU-specific traits from one Monte Carlo trial within the recoverySimulator function. First figure is a time series of spawner and recruit abundance through the observation and simulation period for one CU (selected at random or with focalCU argument). Second figure shows the stock-recruit relationship for that same CU separating abundances from process (filled circles) and observation model (closed circles). Remaining figures are time series from up to six CUs (if more are passed, 6 will be selected at random) showing the metrics passed in the input array.

Usage

plotDiagCU(
  varArray,
  varNames,
  stkName = NULL,
  model,
  ricB,
  larBList = NULL,
  medAbundance = NULL,
  nPrime,
  extinct,
  focalCU = NULL
)

Arguments

varArray

A numeric array containing CU-specific data.

varNames

A character vector containing the names of each variable passed to the function (i.e. names for the third dimension of varArray).

stkName

An optional character vector containing stock/CU names. Recommended for plotting.

model

A character vector specifying whether each CU is fit to a Ricker or Larkin model. Length equal to the number of CUs.

ricB

A numeric vector of each CU's Ricker beta parameter.

larBList

A numeric list of four numeric vectors, each representing CU-specific estimates of lagged density dependent effects from Larkin models.

medAbundance

A numeric matrix of each CU's median abundance plus upper and lower quantiles.

nPrime

Numeric representing length of pre-simulation priming period (i.e. observation period) in the Monte Carlo trial.

extinct

A binary vector of extinct (1) and extant (0) CUs.

focalCU

A numeric identifying the CU that should be selected for presentation. If NULL (default), a CU is selected at random.

Value

Returns a multi-page panel, multi-page plot.


CamFreshwater/samSim documentation built on Sept. 25, 2023, 10:22 a.m.