Estimate Numbers and Mean Values by Length or Age Class
Source:R/doEstimationRatio.R
doEstimationRatio.RdThe function is under development and does not work yet.
Usage
doEstimationRatio(
RDBESDataObj,
targetValue = "LengthComp",
raiseVar = "Weight",
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".
- raiseVar
The variable used to construct the ratio.
- 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.