ReportRecaCatchAtAgeCovariance: Report covariance of catch at age

View source: R/StoxReportFunctions.R

ReportRecaCatchAtAgeCovarianceR Documentation

Report covariance of catch at age

Description

Tabulates the covariance between age groups of (number) at age from MCMC simulations using Reca. MCMC simulations are typically obtained with RunRecaModels. Covariances are obtained from the posterior distribution.

If 'RecaCatchAtAge' contains estimate for a set of aggregation variables, such as area, gear, stock, etc., covariances are calculated between age groups for each of these aggregation variables.

Rounding of numbers according to the argument 'Decimals' is done with round, so that negative numbers specify rounding to powers of ten, and rounding of the digit 5 is towards the even digit.

The units considered valid for catch at age in numbers are those listed for quantity 'cardinaltiy' in StoxUnits

Usage

ReportRecaCatchAtAgeCovariance(
  RecaCatchAtAge,
  PlusGroup = integer(),
  Decimals = integer(),
  Unit = RstoxData::getUnitOptions("cardinality", conversionRange = c(1, 1e+12))
)

Arguments

RecaCatchAtAge

Results from MCMC simulations (RecaCatchAtAge).

PlusGroup

If given, ages 'PlusGroup' or older are included in a plus group.

Decimals

integer specifying the number of decimals to report for 'Covariance'. Defaults to 0.

Unit

unit for 'CatchAtAge'. Covariance will be provided as the square of this unit.

Value

ReportFdaCatchAtAgeCovarianceData

See Also

RunRecaModels for running Reca-analysis and ReportRecaCatchAtLength for reporting length composition.

Examples

 covariances <- RstoxFDA::ReportRecaCatchAtAgeCovariance(RstoxFDA::RecaCatchAtAgeExample, 
        PlusGroup = 13)
 covariances$CovarianceNbyAge

StoXProject/RstoxFDA documentation built on Dec. 17, 2024, 10:58 a.m.