adfg.ScaleInputSSs: Calculate the "input" sample sizes to TCSAM02 for ADFG size...

View source: R/adfg.ScaleInputSSs.R

adfg.ScaleInputSSsR Documentation

Calculate the "input" sample sizes to TCSAM02 for ADFG size composition data

Description

Function to calculate the "input" sample sizes to TCSAM02 for ADFG size composition data.

Usage

adfg.ScaleInputSSs(dfrSS, .ss_scl, .ss_max = 200)

Arguments

dfrSS
  • dataframe with original sample sizes (see details)

.ss_scl
  • scale factor for sample sizes from adfg.calcScaleFactorForInputSSs

.ss_max
  • maximum input sample size (summed across all non-year factors) allowed

Details

The scale factor ss_scl and max input sample size ss_max are used to determine input annual sample sizes for size composition data using the formula
inp_ss = min(max_ss,max_ss\*(ss_tot/ss_scl)\*(ss/ss_tot)
where ss is the original sample size (the total number of crab measured) by factor combination and ss_tot is the total sample size by year.

Value

dataframe or tibble with the same column order as the input, but with additional columns ss_orig, ss_tot, and ss_scl. Column ss contains the scaled sample sizes, column ss_scl contains the scale used to convert the original sample sizes, and column ss_orig contains the original sample sizes.

Note

dfrSS should have (at least) the columns

  • year

  • ss

dfrSS should include sample sizes for only a single fishery or survey.


wStockhausen/tcsamFisheryDataADFG documentation built on April 18, 2023, 12:56 p.m.