getResiduals: Gather stock-recruit residuals

Description Usage Arguments Value Examples

View source: R/getResiduals.R

Description

This function fits simple stock-recruit models (Ricker or Larkin) to generate model residuals that can be merged with simulated recruitment deviations. Useful for posterior predictive comparisons and generating output figures if model residuals are a variable of interest.

Usage

1
getResiduals(recList, modelVec)

Arguments

recList

A list of length nCU with each element a dataframe with nrow = to length of the maximum observed timeseries. Each dataframe should contain the following columns: an estimate of total recruitment (by brood year), spawner abundance, and brood year. Lagged spawner abundances are automatically generated by the function.

modelVec

A character vector of model names with length nCU (ricker or larkin).

Value

A numeric matrix of model residuals with nrow = nrow(input data) and ncol = nCU.

Examples

1
# EXAMPLE DATA NEEDS TO BE GENERATED

TESA-workshops/TESAsamSim documentation built on Feb. 6, 2021, 12:25 a.m.