View source: R/akfin.ScaleInputSSs.R
akfin.ScaleInputSSs | R Documentation |
Function to calculate the "input" sample sizes to TCSAM02 for AKFIN size composition data.
akfin.ScaleInputSSs(dfrSS, .ss_scl, .ss_max = 200)
dfrSS |
: dataframe with original sample sizes (see details) |
.ss_scl |
: scale factor for sample sizes from |
.ss_max |
: maximum input sample size allowed |
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.
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.
dfrSS
should have (at least) the columns
year
ss
dfrSS
should include sample sizes for only a single fishery or survey.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.