inputList_AggregateCatchData: Create an input list for aggregate catch data

View source: R/writeFunctions.R

inputList_AggregateCatchDataR Documentation

Create an input list for aggregate catch data

Description

Function to create an input list for aggregate catch data.

Usage

inputList_AggregateCatchData(
  type = c("ABUNDANCE", "BIOMASS"),
  dfr = NULL,
  cv = 0.05,
  minErr = 100,
  optFit = c("BY_X", "BY_XM"),
  likeType = c("NORM2", "NORMAL", "LOGNORMAL"),
  likeWgt = 1,
  unitsIn = ifelse(toupper(type[1]) == "ABUNDANCE", c("ONES", "MILLIONS"), c("KG",
    "THOUSANDS_MT", "MILLIONS_LBS")),
  unitsOut = ifelse(toupper(type[1]) == "ABUNDANCE", c("MILLIONS", "ONES"),
    c("THOUSANDS_MT", "KG", "MILLIONS_LBS"))
)

Arguments

type

: type of aggregate catch data ("ABUNDANCE" or "BIOMASS")

dfr

: the dataframe

cv

: the default cv (NULL to use cv's from dfr)

minErr

: minimum assumed error in catch data (in 1's or kg, depending on type)

optFit

: objective function fitting option (e.g., "BY_X","BY_XM")

likeType

: likelihood type ("NORM2", "NORMAL" or "LOGNORMAL")

likeWgt

: likelihood multiplier

unitsIn

: units for input data (possibilities depend on type)

unitsOut

: units for output data (possibilities depend on type)

Details

See below:

Output list has elements:

  • dfr - dataframe

  • cv - default cv or dataframe with 'year', 'cv', and 'minErr' as columns (e.g., for fishery data)

  • minErr - minimum assumed error in catch data (in 1's)

  • optFit - objective function fitting option

  • likeType - likelihood type

  • likeWgt - likelihood multiplier

  • unitsIn - input units

  • unitsOut - output units

Possible units are:

  • type = "ABUNDANCE": "ONES" or "MILLIONS"

  • type = "BIOMASS": 'THOUSANDS_MT', 'MILLIONS_LBS', or 'KG'

Value

a list (see Details).


wStockhausen/tcsamFunctions documentation built on Jan. 28, 2024, 9:01 a.m.