Here we describe the various functions within the afscISS package that obtain results provided from the surveyISS package.

afscISS::get_ISS()

The primary result that is provided by the afscISS package is the annual input sample size (ISS) for age, length, or conditional age-at-length composition data by survey region; this is provided by the afscISS::get_ISS() function. The following is an example for standard age composition ISS for GOA Pacific cod:

afscISS::get_ISS(species = 21720,
                 region = 'goa',
                 comp = 'age',
                 sex_cat = 4,
                 spec_case = NULL)

The species argument in the afscISS::get_ISS() function is the RACE species code for your species.

The region argument in the afscISS::get_ISS() function is the survey region for which you desire the ISS. Currently there are 5 survey regions, described in the following table:

region Description
ai Aleutian Islands survey region
ebs Eastern Bering Sea survey region
ebs_slope Eastern Bering Sea slope survey region
goa Gulf of Alaska survey region
nebs Combined Northern and Eastern Bering Sea survey regions

The comp argument in the afscISS::get_ISS() function is the composition type for which you desire ISS. There are 3 options: age for age composition, length for length composition, and caal for conditional age-at-length composition.

The sex_cat argument in the afscISS::get_ISS() function is the sex category for the specific composition data for which you are obtaining ISS output. There are 5 options, described in the following table:

sex_cat Description
0 Combined sex categories (females + males + unsexed) that are combined prior to computation of composition
1 Male composition
2 Female composition
12 Female-Male composition that sums to 1 across both sexes (rather than sum to 1 across Females or Males only)
4 Combined sex categories (females + males + unsexed) that are combined after the computation of composition. Note that this is the historical standard for combined sex composition data at AFSC. Also note that there is no sex category of 4 for conditional age-at-length data, as it is equivalent to sex category 0.

Finally, the spec_case argument in the afscISS::get_ISS() function specifies whether you desire ISS for a special case function within the surveyISS package. Note (1) that these special cases only pertain the the AI and GOA survey regions (so, if you’re getting output for the EBS, EBS slope, for NEBS you don’t put anything here), and (2), that these special cases do not pertain to conditional age-at-length results. There are currently 7 special cases, described in the following table:

spec_case Description
ai_subreg Provides output for age/length composition computed at the sub-region scale within the AI survey region (and will also provide output for the combined values at the overall AI region).
bsre Provides output for the AI Blackspotted-Rougheye stock complex (where length pop’n computed for each individual species but age pop’n computed for the complex as a whole).
dr Provides output for the GOA dusky rockfish stock.
rebs Provides output for the GOA Rougheye-Blackspotted stock complex (where length and age pop’n are computed for each individual species and summed post-expansion).
w_c_egoa Provides output for age/length composition computed for the Western, Central, and Eastern GOA survey regions (and will also provide output for the combined values at the overall GOA region).
w140 Provides output for age/length composition computed for the GOA survey region west of 140^\circ longitude (currently only computed for the GOA walleye pollock stock).
wc_egoa Provides output for age/length composition computed for the Western-Central GOA (combined), and Eastern GOA survey regions (and will also provide output for the combined values at the overall GOA region).

Note that for the bsre, dr, and rebs special cases, the species argument is not needed, as a special species code has already been defined (as an agglomeration of the individual species codes). Also note for that these stock complex special cases are not included in the spatial special cases.

The output that will return from the afscISS::get_ISS() function will include the following columns:

Column Description
year Survey year.
species_code RACE species code.
sex Numerical value for sex category (described in table above).
sex_desc Text string with short description of sex category.
iss Input sample size.
sd_iss Standard deviation of input sample size (derived as the SD of a harmonic mean using the delta method).
nss Nominal sample size (the number of age/length samples collected).
nhl Number of hauls from which samples were collected.

afscISS::get_popn()

The afscISS::get_popn() function obtains the design-based expanded population at age or length values (will also provide the design-based mean and sd in length-at-age when obtaining age output). This output replicates what is provided in the GAP_PRODUCTS tables, with the exception of the special cases implemented in the surveyISS package that are not available in the gapindex package. Note that the sex_cat arguments for this function are 0 (sexes combined pre-expansion), 1 (males), 2 (females), 3 (unsexed), and 4 (sexes combined post-expansion) and does not include sex_cat argument of 12 (as those results are provided in this case for sex_cat 1 and 2 individually). The output that will return from the afscISS::get_popn() function for comp = 'age' will include the following columns:

Column Description
year Survey year.
species_code RACE species code.
sex Numerical value for sex category.
age Age.
agepop Design-based expanded population numbers for age.
mean_length Design-based computed mean length-at-age.
sd_length Design-based computed standard deviation in length-at-age.

The output that will return from the afscISS::get_popn() function for comp = 'length' will include the following columns:

Column Description
year Survey year.
species_code RACE species code.
length Length in cm.
sex Numerical value for sex category.
abund Design-based expanded population numbers for length.

afscISS::get_comp()

The afscISS::get_comp() function obtains the computed age, length, and conditional age-at-length composition from design-based population estimates (i.e., the proportions that would be used in a stock assessment model). The output that will return from the afscISS::get_comp() function for comp = 'age' and comp = 'length' will include the following columns:

Column Description
year Survey year.
species_code RACE species code.
sex Numerical value for sex category. Note that when sex_cat = 12 this will return values of 1 (males) and 2 (females) in the sex column where the proportions will sum to 1 across both sexes.
age/length Age or length (in cm).
prop Proportion at age or length.
q2_5th 2.5th percentile in the bootstrapped proportion at age or length.
q97_5th 97.5th percentile in the bootstrapped proportion at age or length.

The output that will return from the afscISS::get_comp() function for comp = 'caal' will include the following columns:

Column Description
year Survey year.
species_code RACE species code.
sex Numerical value for sex category. Note that the only sex_cat arguments available for comp = 'caal' are 0 (combined sexes), 1 (males), and 2 (females).
length Length in cm.
age Age.
caal Proportion at age within given length.
q2_5th 2.5th percentile in the bootstrapped proportion at age within given length.
q97_5th 97.5th percentile in the bootstrapped proportion at age within given length.

afscISS::get_bias()

The afscISS::get_bias() function obtains the average bias in the bootstrap simulated age/length/conditional age-at-length. The output that will return from the afscISS::get_bias() function for comp = 'age' and comp = 'length' will include the following columns:

Column Description
year Survey year.
species_code RACE species code.
sex Numerical value for sex category.
bias Average bias in composition across age/length.

The output that will return from the afscISS::get_bias() function for comp = 'caal' will include the same columns as comp = 'age' or comp = 'length', with an additional column for length (in cm) to reflect that the bias column is the average bias in composition across age within given length. Note that the only sex_cat arguments available for comp = 'caal' are 0 (combined sexes), 1 (males), and 2 (females).