R/srvy_comps.R
srvy_comps_ai_cmplx.Rd
Function to resample data and compute length and age expansion following Fig. 1 in Hulson and Williams 2024. Customized for ai complexes (i.e., blackspotted-rougheye rockfish) where population at length are expanded at species level, but age specimen data are combined and population at age are expanded at complex level
srvy_comps_ai_cmplx(
lfreq_data,
specimen_data,
cpue_data,
strata_data,
r_t,
yrs = NULL,
bin = 1,
boot_hauls = FALSE,
boot_lengths = FALSE,
boot_ages = FALSE,
al_var = FALSE,
al_var_ann = FALSE,
age_err = FALSE,
len_samples = NULL,
age_samples = NULL,
plus_len = NULL,
plus_age = NULL,
cmplx_code = NULL,
by_strata = FALSE,
global = FALSE
)
length frequency input dataframe
age-length specimen input dataframe
catch-per-unit effort input dataframe
strata id and area size input dataframe
age reader-tester input dataframe, included in surveyISS package data
any year filter >= (default = NULL)
bin size (default = 1 cm), also can use custom length bins following ss3 bin convention
Boolean. Resample hauls w/replacement? (default = FALSE)
Boolean. Resample length frequency w/replacement? (default = FALSE)
Boolean. Resample ages w/replacement? (default = FALSE)
Boolean. Include age-length variability in resampled age data? (default = FALSE)
Boolean. Resample age-length variability annually or pooled across years? (default = FALSE)
Boolean. Include ageing error in resampled age data? (default = FALSE)
If set at a value, tests reductions in haul-level length sampling. To test, set this value at some smaller level than current sampling rate, i.e., 25 (default = NULL)
If set at a value, tests reductions (and increases) in survey-level number of ages collected. To test, set at a proportion of ages collected, i.e., 0.8 or 1.2 (default = NULL)
If set at a value, computes length expansion with a plus-length group (default = FALSE)
If set at a value, computes age expansion with a plus-age group (default = FALSE)
Numeric value to replace the individual species codes with a complex code shared across species. (default = 3005012)
Boolean. Should length/age pop'n values be computed at stratum level? (default = FALSE)
Boolean. Fill in missing length bins with global age-lenth key? (default = FALSE)
List with dataframes of population numbers at length (.lpop) and age (.apop).