akfin.ScaleInputSSs: Calculate the "input" sample sizes to TCSAM02 for AKFIN size...

View source: R/akfin.ScaleInputSSs.R

akfin.ScaleInputSSsR Documentation

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

Description

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

Usage

akfin.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 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/tcsamFisheryDataAKFIN documentation built on Aug. 30, 2023, 12:08 p.m.