Skip to contents

Computes the negative log-likelihood for tag-recapture data using a seasonal, age-based model.

Usage

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

Arguments

tag_switch

Integer flag to turn the likelihood on (>0) or off (0).

minK

Integer, starting cohort index.

n_K

Number of cohorts.

n_T

Number of tagging time periods.

n_I

Number of release ages.

n_J

Number of recapture ages.

first_yr

First model year.

M_a

Vector of natural mortality at age.

hrate_ysa

3D array year, season, age of harvest rates.

tag_release_cta

3D array cohort, time, age of numbers of tags released.

tag_recap_ctaa

4D array cohort, time, rel_age, recap_age of numbers of tags recaptured.

minI, maxI, maxJ

Vectors giving the min and max release and recapture ages for each cohort.

shed1, shed2

Vectors of shedding rates per time period.

tag_rep_rates_ya

Matrix of tag reporting rates by year and age.

tag_H_factor

Numeric scaling factor for incomplete mixing.

tag_var_factor

Overdispersion factor.

Value

Negative log-likelihood (scalar) for tag data.