TagIntegrated data and parameter descriptions
Users need to population a named list containing data inputs and a named list specifying starting values for estimable parameters which are both passed to TMB’s MakeADFun function. These sections outline the elements and corresponding dimensions of both data and parameters.
data
agesvector of ages. Lengthn_agesyearsvector of years from start year to current year. lengthn_yearslength_binsvector of length bin midpoints. length.n_length_binsn_projections_yearsinteger of future years to project the modeln_projyears = n_years + n_projections_yearsdo_projectioninteger 0 means don’t do projection 1 does a stochastic projection (should be turned off during estimation)n_regionsinteger needs to be greater than or equal to 1n_surveysinteger needs to be greater than or equal to 1. This defines the outer dimension for all survey objectsn_movement_time_blocksinteger needs to be greater than or equal to 1. Specifies the number of movement blocks. You can have a value for each year if you want.global_rec_devsinteger 1 means all regions share the same annual recruitment deviations. 0 means they have separate annual recruitment deviations. This will effect the dimensions of the parametertrans_rec_devrec_devs_sum_to_zeroShould the recruit devs in each region sum to zero? yes = 1, no = 0. I yes then this the parametertrans_rec_devhas one less parametern_init_rec_devsnumber of initial n_age_deviations (parameter$ln_init_rec_dev) to multiply against the initial numbers at age to have non equilibrium initial age-structure. A value of zero will not apply these initial devs and expectsparameter$ln_init_rec_devto have length 1. These deviations are applied equally to both male and female.MNatural mortality array with dimensionsn_ages\(\times\)n_projyearsmaturityproportion mature array with dimensionsn_ages\(\times\)n_projyearsmale_mean_weight_by_agemale mean weight at age array with dimensionsn_ages\(\times\)n_projyears. Units are in kgs, this is because we track millions of fish in the partition, so any weight calculation is in kilo tonnesfemale_mean_weight_by_agefemale mean weight at age array with dimensionsn_ages\(\times\)n_projyears. Units are in kgs, this is because we track millions of fish in the partition, so any weight calculation is in kilo tonnesmale_age_length_transitionmale age-length transtion matrix for each year. An array with dimensionsn_ages\(\times\)n_length_bins\(\times\)n_projyearsfemale_age_length_transitionfemale age-length transtion matrix for each year. An array with dimensionsn_ages\(\times\)n_length_bins\(\times\)n_projyearsSrTypeStock recruitment type 2 = Beverton holt, 3 = average (NO SR)spawning_time_proportionvector of proportions that indicate when during the year spawning occurs. Length =n_projyearsapply_fixed_movementinteger whether to apply the inputfixed_movement_matrixor estimated movement matrix. This was added because the transformation on estimated movement parameters does not allow values to be zero or one so cannot truly apply no movement. That is when I have used this fixed movementdo_recruits_moveinteger specifying whether recruits are applied in the movement dynamic. 1 = yes, 0 = no.movement_time_block_indicatora vector of integers (C++ indices) that indicate which movement matrix time-block to apply. The model is initialised with the first movement matrix, and uses the last movement matrix in the projection period.n_movement_time_blocks = length(unique(movement_time_block_indicator))fixed_movement_matrixmovement matrix array with dimensionsn_regions\(\times\)n_regions\(\times\)n_movement_time_blocks. Rows sum equal to one and the third dimension relates to the time-blocprop_F_histscalar proportion of longline average F that is applied during initialization.F_methodinteger, if = 0 then we estimate mean and deviation F free parameters, otherwise if equal 1, use newton raphson iterations and solve FF_maxscalar Maxium F when using theF_method = 1F_iterationsinteger how many newton raphson iterations are done to solve F whenF_method = 1fixed_fishery_catchvector of annual catch for the fixed gear fishery. Units are kilo tonnestrwl_fishery_catchvector of annual catch for the Trawl gear fishery. Units are kilo tonnesfixed_sel_typevector of integers specifying the selectivity type in each time-blocklength(unique(fixed_sel_by_year_indicator)). Values 0 = logistic, 1 = Double normal, 2 = power function, 3 = alternative logistic formulation, 4 = exponential decay, 5 = double normal with three parametersfixed_sel_by_year_indicatorvector of integers specifying which selectivity time-block to apply in each year (C++ indexing so start at zero). Expected length isn_projyearstrwl_sel_typevector of integers specifying the selectivity type in each time-blocklength(unique(trwl_sel_by_year_indicator)). Values 0 = logistic, 1 = Double normal, 2 = power function, 3 = alternative logistic formulation, 4 = exponential decay, 5 = double normal with three parameterstrwl_sel_by_year_indicatorvector of integers specifying which selectivity time-block to apply in each year (C++ indexing so start at zero). Expected length isn_projyearssrv_sel_typevector of integers specifying the selectivity type in each time-block,length(unique(srv_sel_by_year_indicator)) x n_surveys. Values 0 = logistic, 1 = Double normal, 2 = power function, 3 = alternative logistic formulation, 4 = exponential decay, 5 = double normal with three parameterssrv_sel_by_year_indicatorvector of integers specifying which selectivity time-block to apply in each year (C++ indexing so start at zero). Expected dimension isn_projyears x n_surveystag_release_event_this_yearvector of integers specifying whether tags are released in each year. Lengthn_years.n_years_with_tag_releases = sum(tag_release_event_this_year)male_tagged_cohorts_by_ageNumbers of male tagged fish. Dimensionn_ages\(\times\)n_region\(\times\)n_years_with_tag_releases. These are in actual numbers not millions of fish, like the recruitment parameters and other model abundance quantitiesfemale_tagged_cohorts_by_ageNumbers of female tagged fish. Dimensionn_ages\(\times\)n_region\(\times\)n_years_with_tag_releases. These are in actual numbers not millions of fish, like the recruitment parameters and other model abundance quantitiesn_years_to_retain_tagged_cohorts_forinteger, number of years to keep release event information on tag-releasesinitial_tag_induced_mortalityvector or initial tag release mortality with lengthn_years_with_tag_releasesannual_tag_shedding_ratescalar for annual tag-shedding rateageing_error_matrixageing error matrixn_ages\(\times\)n_agesfixed_catchatage_indicatoran indicator array for fixed gear catch at age observation with dimensionsn_regions\(\times\)n_years. A one indicates there is a catch at age observation for the fixed fishery in this region and year. A zero indicates no observation.obs_fixed_catchatagefixed catch at age observation with dimensionsn_ages * 2\(\times\)n_regions\(\times\)n_years. The first dimension represents sex and age with males being the first age block followed by females. This observation is in numbers which is equivalent to proportions times the effective sample size. Predicted proportions will sum = 1 over the age and sex dimension.fixed_catchatage_covar_structureinteger, this is a place holder doesn’t do anything yet, will be used when there is alternative composition likelihoods.fixed_catchatage_comp_likelihoodinteger, 0 indicates multinomial, 1 indicates dirichlet-multinomialtrwl_catchatlgth_indicatoran indicator array for trawl gear catch at length observation with dimensionsn_regions\(\times\)n_years. A one indicates there is a catch at length observation for the trawl fishery in this region and year. A zero indicates no observation.obs_trawl_catchatlgthfixed catch at length observation with dimensionsn_length_bins * 2\(\times\)n_regions\(\times\)n_years. The first dimension represents length bin and age with males being the first length block followed by females. This observation is in numbers which is equivalent to proportions times the effective sample size. Predicted proportions will sum = 1 over the length and sex dimension.trwl_catchatlgth_covar_structureinteger, this is a place holder doesn’t do anything yet, will be used when there is alternative composition likelihoods.trwl_catchatlgth_comp_likelihoodinteger, 0 indicates multinomial, 1 indicates dirichlet-multinomialfixed_catchatlgth_indicatoran indicator array for fixed gear catch at length observation with dimensionsn_regions\(\times\)n_years. A one indicates there is a catch at length observation for the fixed gear fishery in this region and year. A zero indicates no observation.obs_fixed_catchatlgthfixed catch at length observation with dimensionsn_length_bins * 2\(\times\)n_regions\(\times\)n_years. The first dimension represents length bin and age with males being the first length block followed by females. This observation is in numbers which is equivalent to proportions times the effective sample size. Predicted proportions will sum = 1 over the length and sex dimension.fixed_catchatlgth_covar_structureinteger, this is a place holder doesn’t do anything yet, will be used when there is alternative composition likelihoods.fixed_catchatlgth_comp_likelihoodinteger, 0 indicates multinomial, 1 indicates dirichlet-multinomialsrv_catchatage_indicatoran indicator array for survey catch at age observation with dimensionsn_regions\(\times\)n_years\(\times\)n_surveys. A one indicates there is a catch at age observation for the longline survey in this region and year. A zero indicates no observation.obs_srv_catchatageObserved catch at age observation for surveys with dimensionsn_ages * 2\(\times\)n_regions\(\times\)n_years\(\times\)n_surveys. The first dimension represents age and age with males being the first age block followed by females. This observation is in numbers which is equivalent to proportions times the effective sample size. Predicted proportions will sum = 1 over the age and sex dimension.srv_catchatage_covar_structureinteger, this is a place holder doesn’t do anything yet, will be used when there is alternative composition likelihoods.srv_catchatage_comp_likelihoodvector of integers of length`n_surveys, 0 indicates multinomial, 1 indicates dirichlet-multinomialsrv_bio_indicatoran indicator array for survey abundance (or biomass) observation with dimensionsn_regions\(\times\)n_years\(\times\) `n_surveys. A one indicates there is an abundance observation for the longline survey in this region and year. A zero indicates no observation.obs_srv_biosurvey abundance observationn_regions\(\times\)n_years\(\times\) `n_surveys. This observation is in numbers (000’s) which is equivalent to proportions times the effective sample size. Predicted proportions will sum = 1 over the age and sex dimension.obs_srv_seStandard error for the survey abundance observation same dimension as observationsrv_bio_likelihoodvector of integers of lengthn_surveys, a value of 0 is the old lognormal call (SE is normal distribution converted to CV by the likelihood evaluation), a value of 1 uses thedlnorm` call, standard error are specified in as the lognormal disribution (different to the other value)srv_obs_is_abundancevector of integers integer of length `n_surveys, a value of 0 indicates the observation is biomass or weight. A value of 1 indicates the observation is abundance or numberssrv_q_by_year_indicatorindicator vector, this indicates how many time-blocks for time-varying catchabilities are available. Each element links an element of the parametertrans_srv_qfor a year.srv_q_transformationvector of integers of lengthn_surveys, indicates what transformation is used fortrans_srv_q`. 0 indicates log, 1 indicates logistic where q is bound between 0 and 1.q_is_nuisancevector of integers of length a 0 indicates q is calculated as a free parametertrans_srv_q. If it is equal to 1 then you shouldn’t estimatetrans_srv_qbecause it calculates the survey catchability values based on MLE values conditional on input values.tag_recovery_indicator_by_yearan indicator vector for tag-recovery observations has lengthn_years. A one indicates there is a tag recovery observation in this year. A zero indicates no observation. This object is used to definen_tag_recovery_years = sum(tag_recovery_indicator_by_year), which links to other tag-recovery structures. This input parameter is not used whentag_likelihood %in% c(2).tag_recovery_indicatoran indicator vector for specific tag-release/tag-recovery observations to store. Dimensions of this will depend ontag_likelihood. Iftag_likelihood %in% c(0,1)then the dimension isn_tag_release_events\(\times\)n_regions\(\times\)n_tag_recovery_years. Iftag_likelihood %in% c(2)then the dimensions aren_years\(\times\)n_regionsthis indicates the release event that we wont to save all possible recovery predictions for.obs_tag_recoverytag-recovery observations. Dimension will depend ontag_likelihood. Iftag_likelihood %in% c(0,1)then the dimensions aren_tag_release_events\(\times\)n_regions\(\times\)n_tag_recovery_years. Units are numbers (can be non-integer) of recoveries. Iftag_likelihood %in% c(2)then the dimensions aren_regions * n_years_to_retain_tagged_cohorts_for + 1\(\times\)n_regions\(\times\)n_years. The first dimensions relate to a release event, the last dimension relates to all possible recovery events and plus one for the not recovered group.tag_likelihoodinteger specifying the tag-likelihood, 0 = Poisson, 1 = negative binomial, 2 = Multinomial (release conditioned)evaluate_tag_likelihoodinteger specifying whether to evaluate the likelihood (=1) or not (=0) useful when asking the model to calculate predicted values but not evaluate the likelihood for debugging.future_recruitment_typeinteger specifying the future recruitment deviation process. 0 = simulate from lognormal distribution with using the sigma R, 1 = empirically re sample input recruitment deviations, 2 = recruitment multiplers = 1 which results in the model applying mean recruitment for all future yearsyear_ndx_for_empirical_resamplinginteger vector specifying years to empirically resample from if future_recruitment_type == 1, then this specifies the upper and lower index to resample e.g.,year_ndx_for_empirical_resampling = c(0,n_years - 1)then this would resample from all years ifyear_ndx_for_empirical_resampling = c((n_years - 10), n_years - 1), then this would resample from the last ten years of the input recruitment deviationsfuture_fishing_typeinteger 0 means users have supplied fishing mortality rates in future fishing input containers. If 1 then user supplied catchs in future fishing input containers.future_fishing_inputs_fixedan array with dimensionsn_regions\(\times\)n_projections_years. Will be F’s or catches fir the fixed gear fishery depending on the value offuture_fishing_typefuture_fishing_inputs_trwlan array with dimensionsn_regions\(\times\)n_projections_years. Will be F’s or catches fir the trawl gear fishery depending on the value offuture_fishing_type
parameters
ln_mean_recvector of natural logarithm of mean recruitment (units are log millions) for each region. lengthn_regions.trans_rec_devarray of recruitment deviations. ifglobal_rec_devs= 1 then this has dimension1\(\times\)n_years, else it has a row for each region and dimensionn_regions\(\times\)n_yearsln_init_rec_devvector of initial devs to multiple to initial numbers at age for non-equilibrium age-structure. Must have length equal todata$n_init_rec_devs. The first dev, corresponds to the second age we the last value gets applied to all successive ages i.e., iflength(ln_init_rec_dev) = 10, the first valuenumbers_at_age[2] * exp(ln_init_rec_dev[1]), andnumbers_at_age[11:n_ages] * exp(ln_init_rec_dev[10])ln_fixed_sel_parsarray of log selectivity parameters for fixed gear fishery with dimensionn_time_blocks\(\times\)max(sel parameters)\(\times\)2(for each sex) male parameters first followed by female. The number of time-blocks is defined by the data parameterdata$fixed_sel_by_year_indicatorand max selectivity parameters controlled bydata$fixed_sel_typewhich defines the selectivity shape and thus number of parameters.ln_trwl_sel_parsarray of log selectivity parameters for trawl gear fishery with dimensionn_time_blocks\(\times\)max(sel parameters)\(\times\)2(for each sex) male parameters first followed by female. The number of time-blocks is defined by the data parameterdata$trwl_sel_by_year_indicatorand max selectivity parameters controlled bydata$trwl_sel_typewhich defines the selectivity shape and thus number of parameters.transformed_movement_parsarray of movement parameters that are transformed in the simplex space. It has dimensionn_regions - 1\(\times\)n_regions\(\times\)n_movement_time_blocks. Use the packages inbuiltsimplex()andrestoresimplex()functions to change a vector that sums to one to a simplex with n-1 parameters.ln_fixed_F_avgscalar for the log average fishing mortality of the fixed gear fishery. Should be not estimated ifdata$F_method = 1ln_fixed_F_devsannual fishing mortality deviations fromln_fixed_F_avg. Expected dimensions aren_regions\(\times\)n_years. Should be not estimated ifdata$F_method = 1ln_trwl_F_avgscalar for the log average fishing mortality of the fixed gear fishery. Should be not estimated ifdata$F_method = 1ln_trwl_F_devsannual fishing mortality deviations fromln_trwl_F_avg. Expected dimensions aren_regions\(\times\)n_years. Should be not estimated ifdata$F_method = 1ln_init_F_avgscalar for the log fishing mortality applied during initialisation.ln_catch_sdscalar for the log catch standard deviationtrans_srv_qann array of transformed catchabilities parameters. The type of transformation will depend onsrv_q_transformation. Should have dimensionn_regions\(\times\)length(unique(data$srv_q_by_year_indicator))(number of time-blocks) \(\times\)n_surveysln_srv_sel_parsarray of log selectivity parameters for surveys with dimensionn_time_blocks\(\times\)max(sel parameters)\(\times\)2(for each sex) male parameters first followed by female \(\times\)n_surveys. The number of time-blocks is defined by the data parameterdata$srv_sel_by_year_indicatorand max selectivity parameters controlled bydata$srv_sel_typewhich defines the selectivity shape and thus number of parameters.logistic_tag_reporting_ratelogistic tag-reporting rates. Expected dimensions aren_regions\(\times\)n_tag_recovery_years.ln_tag_phiscalar which is the log of the dispersion parameter. Only used ifdata$tag_likelihood == 1i.e. the negative binomial distribution is assumed.ln_sigma_Rscalar which is the log standard deviation for the recruitment prior/penaltyln_sigma_init_devsscalar which is the log standard deviation for the initial age deviation prior/penaltytrans_trwl_catchatlgth_errorvector of observation error parameters for trawl catch at length observation Depends ondata$trwl_catchatlgth_comp_likelihood. Ifdata$trwl_catchatlgth_comp_likelihood == 0then this assumes multinomial and this parameter should not be estimated. ifdata$trwl_catchatlgth_comp_likelihood == 1the this assumes the Dirichlet-multinomial distribution and this should have length 1 and is the log \(\theta\) parameter.trans_fixed_catchatlgth_errorvector of observation error parameters for fixed gear fishery catch at length observation. Depends ondata$fixed_catchatlgth_comp_likelihood. Ifdata$fixed_catchatlgth_comp_likelihood == 0then this assumes multinomial and this parameter should not be estimated. ifdata$fixed_catchatlgth_comp_likelihood == 1the this assumes the Dirichlet-multinomial distribution and this should have length 1 and is the log \(\theta\) parameter.trans_fixed_catchatage_errorvector of observation error parameters for fixed catch at age observation. Depends ondata$fixed_catchatage_comp_likelihood. Ifdata$fixed_catchatage_comp_likelihood == 0then this assumes multinomial and this parameter should not be estimated. ifdata$fixed_catchatage_comp_likelihood == 1the this assumes the Dirichlet-multinomial distribution and this should have length 1 and is the log \(\theta\) parameter.trans_srv_catchatage_errorvector of observation error parameters for survey catch at age observation. Depends ondata$srv_catchatage_comp_likelihood. Ifdata$srv_catchatage_comp_likelihood == 0then this assumes multinomial and this parameter should not be estimated. ifdata$srv_catchatage_comp_likelihood == 1the this assumes the Dirichlet-multinomial distribution and this should have length 1 and is the log \(\theta\) parameter.logistic_prop_recruit_malevector logistic proportions male for recruitment. Length:n_yearstrans_SR_parsvector of stock recruitment parameters. IfSrType == 2then this a vector of length 1 containing the logistic transformed steepness parameter. This is to make sure steepness is bound between 0 and 1. The only otherSrTypeallowed is average i.e. no SR and thus no SR parameters. In future this will be extended to include Ricker and other BH parameterisations.