Skip to contents

Calculate Tagging Likelihood (Version 1)

Usage

get_tag_like_v1(
  tag_switch,
  minK,
  n_K,
  n_T,
  n_I,
  n_J,
  first_yr,
  M_a,
  hrate_ysa,
  par_hstar_i,
  tag_release_cta,
  tag_recap_ctaa,
  minI,
  maxI,
  maxJ,
  shed1,
  shed2,
  tag_rep_rates_ya,
  tag_H_factor,
  tag_var_factor,
  tag_offset
)

Arguments

tag_switch

An integer scalar, switch to turn on (>0) or off (0) the tagging likelihood.

minK

An integer scalar, first tagged cohort index.

n_K

An integer scalar, number of tagged cohorts.

n_T

An integer scalar, number of tagger groups.

n_I

An integer scalar, number of release ages.

n_J

An integer scalar, number of recapture ages.

first_yr

An integer scalar, model start year.

M_a

A numeric vector of length n_age, natural mortality-at-age.

hrate_ysa

A numeric array of dimensions \[n_year + 1, n_season, n_age\], harvest rate.

par_hstar_i

A numeric vector, initial harvest rate parameters for tagged fish.

tag_release_cta

A numeric array of dimensions \[n_K, n_T, n_I\], tag releases by cohort, tagger, age.

tag_recap_ctaa

A numeric array of dimensions \[n_K, n_T, n_I, n_J\], tag recaptures.

minI

A numeric vector of length n_K, minimum release age by cohort.

maxI

A numeric vector of length n_K, maximum release age by cohort.

maxJ

A numeric vector of length n_K, maximum recapture age by cohort.

shed1

A numeric vector of length 6, immediate tag shedding rates by tagger.

shed2

A numeric vector of length 6, continuous tag shedding rates by tagger.

tag_rep_rates_ya

A numeric matrix, tag reporting rates by year and age.

tag_H_factor

A numeric scalar, harvest rate adjustment factor for tagged fish.

tag_var_factor

A numeric scalar, overdispersion factor for beta-binomial.

tag_offset

A numeric scalar, offset for likelihood calculation.

Value

A numeric scalar, total negative log-likelihood for tagging data.