Skip to contents

Computes binomial likelihood of recapture events from genetic tagging data.

Usage

get_GT_like(
  gt_switch = 1,
  gt_obs,
  first_yr,
  par_log_gt_q,
  number_ysa,
  gt_od = 1
)

Arguments

gt_switch

Integer flag for likelihood type: 0=off, 1=binomial, 2=beta-binomial.

gt_obs

A data.frame of genetic tagging observations.

first_yr

Integer first model year.

par_log_gt_q

Numeric log-scale catchability coefficient representing the proportion of fish that went through the GAB.

number_ysa

A 3D array of numbers-at-age with dimensions year by season by age.

gt_od

Numeric overdispersion parameter for beta-binomial likelihood (default = 1).

Value

A list containing:

gt_prob

Vector of predicted genetic tag recapture probabilities.

lp

Vector of negative log-likelihood contributions for each observation.