doEstimationRatio: Estimate Numbers and Mean Values by Length or Age Class

View source: R/doEstimationRatio.R

doEstimationRatioR Documentation

Estimate Numbers and Mean Values by Length or Age Class

Description

The function is under development and does not work yet.

Usage

doEstimationRatio(
  RDBESDataObj,
  targetValue = "LengthComp",
  classUnits = "mm",
  classBreaks = c(100, 300, 10),
  LWparam = NULL,
  lowerAux = NULL,
  verbose = FALSE
)

Arguments

RDBESDataObj

A validated RDBESDataObject containing hierarchical sampling and biological data. Must include appropriate tables (e.g., CL, CE, SA, FM, or BV) depending on estimation requirements.

targetValue

A character string specifying the type of composition to estimate. Options are "LengthComp" or "AgeComp".

classUnits

Units of the class intervals for length or age, typically "mm" for millimeters or "cm" for centimeters. Used in defining class intervals.

classBreaks

A numeric vector of three values: minimum value, maximum value, and class width (e.g., c(100, 300, 10)). Defines the class intervals for grouping lengths or ages.

LWparam

A numeric vector of length two specifying parameters (a, b) for the weight-length relationship (W = a * L^b). Used if no direct weights are available but lengths are provided.

lowerAux

A numeric or character vector referencing a variable in the SA table used as an auxiliary variable for ratio estimation (e.g., sample weights, sub-sample expansion factors).

verbose

Logical; if TRUE, detailed messages are printed during processing.

Value

A list or data.table containing the estimated numbers at length or age and associated mean values such as weight and length, depending on input and target type.


ices-tools-dev/icesRDBES documentation built on April 17, 2025, 1:58 p.m.