Skip to contents

Computes the likelihood for a standardized CPUE index using a log-linear model.

Usage

get_cpue_like(
  cpue_switch,
  cpue_a1 = 5,
  cpue_a2 = 17,
  cpue_years,
  cpue_obs,
  cpue_sd,
  cpue_sigma,
  cpue_omega,
  log_cpue_q,
  par_cpue_creep,
  number_ysa,
  sel_fya
)

Arguments

cpue_switch

Integer switch to activate the likelihood.

cpue_a1, cpue_a2

Minimum and maximum CPUE age indices.

cpue_years

a vector of year indices for CPUE observations.

cpue_obs

a vector of observed CPUE values.

cpue_sd

a vector of SDs associated with the observed CPUE values.

cpue_sigma

Process error standard deviation.

cpue_omega

Power parameter for scaling to total numbers.

log_cpue_q

Logarithm of catchability coefficient.

par_cpue_creep

Logarithm of catchability coefficient.

number_ysa

a 3D array year, season, age of numbers-at-age.

sel_fya

a 3D array of selectivity by fishery, year, and age.

Value

a list with predicted CPUE, residuals, and likelihood vector.