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. Lengthn_ages
years
vector of years from start year to current year. lengthn_years
length_bins
vector of length bin midpoints. length.n_length_bins
n_projections_years
integer of future years to project the modeln_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 1n_surveys
integer needs to be greater than or equal to 1. This defines the outer dimension for all survey objectsn_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 parametertrans_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 parametertrans_rec_dev
has one less parametern_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 expectsparameter$ln_init_rec_dev
to have length 1. These deviations are applied equally to both male and female.M
Natural mortality array with dimensionsn_ages
\(\times\)n_projyears
maturity
proportion mature array with dimensionsn_ages
\(\times\)n_projyears
male_mean_weight_by_age
male 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_age
female 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_transition
male age-length transtion matrix for each year. An array with dimensionsn_ages
\(\times\)n_length_bins
\(\times\)n_projyears
female_age_length_transition
female age-length transtion matrix for each year. An array with dimensionsn_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 inputfixed_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 movementdo_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 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_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 FF_max
scalar Maxium F when using theF_method = 1
F_iterations
integer how many newton raphson iterations are done to solve F whenF_method = 1
fixed_fishery_catch
vector of annual catch for the fixed gear fishery. Units are kilo tonnestrwl_fishery_catch
vector of annual catch for the Trawl gear fishery. Units are kilo tonnesfixed_sel_type
vector 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_indicator
vector of integers specifying which selectivity time-block to apply in each year (C++ indexing so start at zero). Expected length isn_projyears
trwl_sel_type
vector 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_indicator
vector of integers specifying which selectivity time-block to apply in each year (C++ indexing so start at zero). Expected length isn_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 parameterssrv_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 isn_projyears x n_surveys
tag_release_event_this_year
vector 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_age
Numbers 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_age
Numbers 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_for
integer, number of years to keep release event information on tag-releasesinitial_tag_induced_mortality
vector or initial tag release mortality with lengthn_years_with_tag_releases
annual_tag_shedding_rate
scalar for annual tag-shedding rateageing_error_matrix
ageing error matrixn_ages
\(\times\)n_ages
fixed_catchatage_indicator
an 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_catchatage
fixed 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_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-multinomialtrwl_catchatlgth_indicator
an 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_catchatlgth
fixed 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_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-multinomialfixed_catchatlgth_indicator
an 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_catchatlgth
fixed 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_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-multinomialsrv_catchatage_indicator
an 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_catchatage
Observed 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_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-multinomialsrv_bio_indicator
an 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_bio
survey 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_se
Standard error for the survey abundance observation same dimension as observationsrv_bio_likelihood
vector 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 the
dlnorm` 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 numberssrv_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 parametertrans_srv_q
for a year.srv_q_transformation
vector of integers of lengthn_surveys, indicates what transformation is used for
trans_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 parametertrans_srv_q
. If it is equal to 1 then you shouldn’t estimatetrans_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 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_indicator
an 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_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 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_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 yearsyear_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 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_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 dimensionsn_regions
\(\times\)n_projections_years
. Will be F’s or catches fir the fixed gear fishery depending on the value offuture_fishing_type
future_fishing_inputs_trwl
an 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_rec
vector of natural logarithm of mean recruitment (units are log millions) for each region. lengthn_regions
.trans_rec_dev
array 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_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 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_pars
array 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_indicator
and max selectivity parameters controlled bydata$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 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_indicator
and max selectivity parameters controlled bydata$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 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_avg
scalar for the log average fishing mortality of the fixed gear fishery. Should be not estimated ifdata$F_method = 1
ln_fixed_F_devs
annual fishing mortality deviations fromln_fixed_F_avg
. Expected dimensions aren_regions
\(\times\)n_years
. Should be not estimated ifdata$F_method = 1
ln_trwl_F_avg
scalar for the log average fishing mortality of the fixed gear fishery. Should be not estimated ifdata$F_method = 1
ln_trwl_F_devs
annual fishing mortality deviations fromln_trwl_F_avg
. Expected dimensions aren_regions
\(\times\)n_years
. Should be not estimated ifdata$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 deviationtrans_srv_q
ann 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_surveys
ln_srv_sel_pars
array 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_indicator
and max selectivity parameters controlled bydata$srv_sel_type
which defines the selectivity shape and thus number of parameters.logistic_tag_reporting_rate
logistic tag-reporting rates. Expected dimensions aren_regions
\(\times\)n_tag_recovery_years
.ln_tag_phi
scalar which is the log of the dispersion parameter. Only used ifdata$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/penaltyln_sigma_init_devs
scalar which is the log standard deviation for the initial age deviation prior/penaltytrans_trwl_catchatlgth_error
vector of observation error parameters for trawl catch at length observation Depends ondata$trwl_catchatlgth_comp_likelihood
. Ifdata$trwl_catchatlgth_comp_likelihood == 0
then this assumes multinomial and this parameter should not be estimated. ifdata$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 ondata$fixed_catchatlgth_comp_likelihood
. Ifdata$fixed_catchatlgth_comp_likelihood == 0
then this assumes multinomial and this parameter should not be estimated. ifdata$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 ondata$fixed_catchatage_comp_likelihood
. Ifdata$fixed_catchatage_comp_likelihood == 0
then this assumes multinomial and this parameter should not be estimated. ifdata$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 ondata$srv_catchatage_comp_likelihood
. Ifdata$srv_catchatage_comp_likelihood == 0
then this assumes multinomial and this parameter should not be estimated. ifdata$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. IfSrType == 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 otherSrType
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.