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

  • ages vector of ages. Length n_ages

  • years vector of years from start year to current year. length n_years

  • length_bins vector of length bin midpoints. length. n_length_bins

  • n_projections_years integer of future years to project the model n_projyears = n_years + n_projections_years

  • do_projection integer 0 means don’t do projection 1 does a stochastic projection (should be turned off during estimation)

  • n_regions integer needs to be greater than or equal to 1

  • n_surveys integer needs to be greater than or equal to 1. This defines the outer dimension for all survey objects

  • n_movement_time_blocks integer 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_devs integer 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 parameter trans_rec_dev

  • rec_devs_sum_to_zero Should the recruit devs in each region sum to zero? yes = 1, no = 0. I yes then this the parameter trans_rec_dev has one less parameter

  • n_init_rec_devs number 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 expects parameter$ln_init_rec_dev to have length 1. These deviations are applied equally to both male and female.

  • M Natural mortality array with dimensions n_ages \(\times\) n_projyears

  • maturity proportion mature array with dimensions n_ages \(\times\) n_projyears

  • male_mean_weight_by_age male mean weight at age array with dimensions n_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 tonnes

  • female_mean_weight_by_age female mean weight at age array with dimensions n_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 tonnes

  • male_age_length_transition male age-length transtion matrix for each year. An array with dimensions n_ages \(\times\)n_length_bins \(\times\) n_projyears

  • female_age_length_transition female age-length transtion matrix for each year. An array with dimensions n_ages \(\times\)n_length_bins \(\times\) n_projyears

  • SrType Stock recruitment type 2 = Beverton holt, 3 = average (NO SR)

  • spawning_time_proportion vector of proportions that indicate when during the year spawning occurs. Length = n_projyears

  • apply_fixed_movement integer whether to apply the input fixed_movement_matrix or 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 movement

  • do_recruits_move integer specifying whether recruits are applied in the movement dynamic. 1 = yes, 0 = no.

  • movement_time_block_indicator a 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_matrix movement matrix array with dimensions n_regions \(\times\)n_regions\(\times\)n_movement_time_blocks . Rows sum equal to one and the third dimension relates to the time-bloc

  • prop_F_hist scalar proportion of longline average F that is applied during initialization.

  • F_method integer, if = 0 then we estimate mean and deviation F free parameters, otherwise if equal 1, use newton raphson iterations and solve F

  • F_max scalar Maxium F when using the F_method = 1

  • F_iterations integer how many newton raphson iterations are done to solve F when F_method = 1

  • fixed_fishery_catch vector of annual catch for the fixed gear fishery. Units are kilo tonnes

  • trwl_fishery_catch vector of annual catch for the Trawl gear fishery. Units are kilo tonnes

  • fixed_sel_type vector of integers specifying the selectivity type in each time-block length(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 parameters

  • fixed_sel_by_year_indicator vector of integers specifying which selectivity time-block to apply in each year (C++ indexing so start at zero). Expected length is n_projyears

  • trwl_sel_type vector of integers specifying the selectivity type in each time-block length(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 parameters

  • trwl_sel_by_year_indicator vector of integers specifying which selectivity time-block to apply in each year (C++ indexing so start at zero). Expected length is n_projyears

  • srv_sel_type vector 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 parameters

  • srv_sel_by_year_indicator vector of integers specifying which selectivity time-block to apply in each year (C++ indexing so start at zero). Expected dimension is n_projyears x n_surveys

  • tag_release_event_this_year vector of integers specifying whether tags are released in each year. Length n_years. n_years_with_tag_releases = sum(tag_release_event_this_year)

  • male_tagged_cohorts_by_age Numbers of male tagged fish. Dimension n_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 quantities

  • female_tagged_cohorts_by_age Numbers of female tagged fish. Dimension n_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 quantities

  • n_years_to_retain_tagged_cohorts_for integer, number of years to keep release event information on tag-releases

  • initial_tag_induced_mortality vector or initial tag release mortality with length n_years_with_tag_releases

  • annual_tag_shedding_rate scalar for annual tag-shedding rate

  • ageing_error_matrix ageing error matrix n_ages \(\times\) n_ages

  • fixed_catchatage_indicator an indicator array for fixed gear catch at age observation with dimensions n_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_catchatage fixed catch at age observation with dimensions n_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_structure integer, this is a place holder doesn’t do anything yet, will be used when there is alternative composition likelihoods.

  • fixed_catchatage_comp_likelihood integer, 0 indicates multinomial, 1 indicates dirichlet-multinomial

  • trwl_catchatlgth_indicator an indicator array for trawl gear catch at length observation with dimensions n_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_catchatlgth fixed catch at length observation with dimensions n_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_structure integer, this is a place holder doesn’t do anything yet, will be used when there is alternative composition likelihoods.

  • trwl_catchatlgth_comp_likelihood integer, 0 indicates multinomial, 1 indicates dirichlet-multinomial

  • fixed_catchatlgth_indicator an indicator array for fixed gear catch at length observation with dimensions n_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_catchatlgth fixed catch at length observation with dimensions n_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_structure integer, this is a place holder doesn’t do anything yet, will be used when there is alternative composition likelihoods.

  • fixed_catchatlgth_comp_likelihood integer, 0 indicates multinomial, 1 indicates dirichlet-multinomial

  • srv_catchatage_indicator an indicator array for survey catch at age observation with dimensions n_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_catchatage Observed catch at age observation for surveys with dimensions n_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_structure integer, this is a place holder doesn’t do anything yet, will be used when there is alternative composition likelihoods.

  • srv_catchatage_comp_likelihood vector of integers of length`n_surveys, 0 indicates multinomial, 1 indicates dirichlet-multinomial

  • srv_bio_indicator an indicator array for survey abundance (or biomass) observation with dimensions n_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_bio survey abundance observation n_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_se Standard error for the survey abundance observation same dimension as observation

  • srv_bio_likelihood vector of integers of length n_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_abundance vector 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 numbers

  • srv_q_by_year_indicator indicator vector, this indicates how many time-blocks for time-varying catchabilities are available. Each element links an element of the parameter trans_srv_q for a year.

  • srv_q_transformation vector of integers of length n_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_nuisance vector of integers of length a 0 indicates q is calculated as a free parameter trans_srv_q. If it is equal to 1 then you shouldn’t estimate trans_srv_q because it calculates the survey catchability values based on MLE values conditional on input values.

  • tag_recovery_indicator_by_year an indicator vector for tag-recovery observations has length n_years. A one indicates there is a tag recovery observation in this year. A zero indicates no observation. This object is used to define n_tag_recovery_years = sum(tag_recovery_indicator_by_year), which links to other tag-recovery structures. This input parameter is not used when tag_likelihood %in% c(2).

  • tag_recovery_indicator an indicator vector for specific tag-release/tag-recovery observations to store. Dimensions of this will depend on tag_likelihood. If tag_likelihood %in% c(0,1) then the dimension is n_tag_release_events \(\times\) n_regions \(\times\) n_tag_recovery_years. If tag_likelihood %in% c(2) then the dimensions are n_years \(\times\) n_regions this indicates the release event that we wont to save all possible recovery predictions for.

  • obs_tag_recovery tag-recovery observations. Dimension will depend on tag_likelihood. If tag_likelihood %in% c(0,1) then the dimensions are n_tag_release_events \(\times\) n_regions \(\times\) n_tag_recovery_years. Units are numbers (can be non-integer) of recoveries. If tag_likelihood %in% c(2) then the dimensions are n_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_likelihood integer specifying the tag-likelihood, 0 = Poisson, 1 = negative binomial, 2 = Multinomial (release conditioned)

  • evaluate_tag_likelihood integer 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_type integer 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 years

  • year_ndx_for_empirical_resampling integer 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 if year_ndx_for_empirical_resampling = c((n_years - 10), n_years - 1), then this would resample from the last ten years of the input recruitment deviations

  • future_fishing_type integer 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_fixed an array with dimensions n_regions \(\times\) n_projections_years. Will be F’s or catches fir the fixed gear fishery depending on the value of future_fishing_type

  • future_fishing_inputs_trwl an array with dimensions n_regions \(\times\) n_projections_years. Will be F’s or catches fir the trawl gear fishery depending on the value of future_fishing_type

Additional data inputs for TagIntegratedValidate

  • apply_Z_on_tagged_fish integer 0 no, 1 yes
  • apply_fishery_tag_reporting integer 0 no, 1 yes
  • apply_tag_reporting_rate integer 0 no, 1 yes

parameters

  • ln_mean_rec vector of natural logarithm of mean recruitment (units are log millions) for each region. length n_regions.

  • trans_rec_dev array of recruitment deviations. if global_rec_devs = 1 then this has dimension 1 \(\times\) n_years, else it has a row for each region and dimension n_regions\(\times\) n_years

  • ln_init_rec_dev vector of initial devs to multiple to initial numbers at age for non-equilibrium age-structure. Must have length equal to data$n_init_rec_devs. The first dev, corresponds to the second age we the last value gets applied to all successive ages i.e., if length(ln_init_rec_dev) = 10, the first value numbers_at_age[2] * exp(ln_init_rec_dev[1]), and numbers_at_age[11:n_ages] * exp(ln_init_rec_dev[10])

  • ln_fixed_sel_pars array of log selectivity parameters for fixed gear fishery with dimension n_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 parameter data$fixed_sel_by_year_indicator and max selectivity parameters controlled by data$fixed_sel_type which defines the selectivity shape and thus number of parameters.

  • ln_trwl_sel_pars array of log selectivity parameters for trawl gear fishery with dimension n_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 parameter data$trwl_sel_by_year_indicator and max selectivity parameters controlled by data$trwl_sel_type which defines the selectivity shape and thus number of parameters.

  • transformed_movement_pars array of movement parameters that are transformed in the simplex space. It has dimension n_regions - 1 \(\times\) n_regions\(\times\) n_movement_time_blocks. Use the packages inbuilt simplex() and restoresimplex() functions to change a vector that sums to one to a simplex with n-1 parameters.

  • ln_fixed_F_avg scalar for the log average fishing mortality of the fixed gear fishery. Should be not estimated if data$F_method = 1

  • ln_fixed_F_devs annual fishing mortality deviations from ln_fixed_F_avg. Expected dimensions are n_regions \(\times\) n_years. Should be not estimated if data$F_method = 1

  • ln_trwl_F_avg scalar for the log average fishing mortality of the fixed gear fishery. Should be not estimated if data$F_method = 1

  • ln_trwl_F_devs annual fishing mortality deviations from ln_trwl_F_avg. Expected dimensions are n_regions \(\times\) n_years. Should be not estimated if data$F_method = 1

  • ln_init_F_avg scalar for the log fishing mortality applied during initialisation.

  • ln_catch_sd scalar for the log catch standard deviation

  • trans_srv_q ann array of transformed catchabilities parameters. The type of transformation will depend on srv_q_transformation. Should have dimension n_regions\(\times\) length(unique(data$srv_q_by_year_indicator)) (number of time-blocks) \(\times\) n_surveys

  • ln_srv_sel_pars array of log selectivity parameters for surveys with dimension n_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 parameter data$srv_sel_by_year_indicator and max selectivity parameters controlled by data$srv_sel_type which defines the selectivity shape and thus number of parameters.

  • logistic_tag_reporting_rate logistic tag-reporting rates. Expected dimensions are n_regions \(\times\) n_tag_recovery_years.

  • ln_tag_phi scalar which is the log of the dispersion parameter. Only used if data$tag_likelihood == 1 i.e. the negative binomial distribution is assumed.

  • ln_sigma_R scalar which is the log standard deviation for the recruitment prior/penalty

  • ln_sigma_init_devs scalar which is the log standard deviation for the initial age deviation prior/penalty

  • trans_trwl_catchatlgth_error vector of observation error parameters for trawl catch at length observation Depends on data$trwl_catchatlgth_comp_likelihood. If data$trwl_catchatlgth_comp_likelihood == 0 then this assumes multinomial and this parameter should not be estimated. if data$trwl_catchatlgth_comp_likelihood == 1 the this assumes the Dirichlet-multinomial distribution and this should have length 1 and is the log \(\theta\) parameter.

  • trans_fixed_catchatlgth_error vector of observation error parameters for fixed gear fishery catch at length observation. Depends on data$fixed_catchatlgth_comp_likelihood. If data$fixed_catchatlgth_comp_likelihood == 0 then this assumes multinomial and this parameter should not be estimated. if data$fixed_catchatlgth_comp_likelihood == 1 the this assumes the Dirichlet-multinomial distribution and this should have length 1 and is the log \(\theta\) parameter.

  • trans_fixed_catchatage_error vector of observation error parameters for fixed catch at age observation. Depends on data$fixed_catchatage_comp_likelihood. If data$fixed_catchatage_comp_likelihood == 0 then this assumes multinomial and this parameter should not be estimated. if data$fixed_catchatage_comp_likelihood == 1 the this assumes the Dirichlet-multinomial distribution and this should have length 1 and is the log \(\theta\) parameter.

  • trans_srv_catchatage_error vector of observation error parameters for survey catch at age observation. Depends on data$srv_catchatage_comp_likelihood. If data$srv_catchatage_comp_likelihood == 0 then this assumes multinomial and this parameter should not be estimated. if data$srv_catchatage_comp_likelihood == 1 the this assumes the Dirichlet-multinomial distribution and this should have length 1 and is the log \(\theta\) parameter.

  • logistic_prop_recruit_male vector logistic proportions male for recruitment. Length: n_years

  • trans_SR_pars vector of stock recruitment parameters. If SrType == 2 then 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 other SrType allowed is average i.e. no SR and thus no SR parameters. In future this will be extended to include Ricker and other BH parameterisations.