Skip to contents

Computes the likelihood for a standardized CPUE index using a log-linear model with optional technological creep adjustment.

Usage

get_cpue_like(
  cpue_switch = 1,
  cpue_years,
  cpue_obs,
  cpue_sd,
  cpue_a1,
  cpue_a2,
  par_log_cpue_q,
  par_log_cpue_sigma,
  par_log_cpue_omega,
  par_cpue_creep,
  creep_init = 1,
  number_ysa,
  sel_fya
)

Arguments

cpue_switch

Integer flag for activation (0=off, >0=on).

cpue_years

A vector of year indices for each CPUE observation.

cpue_obs

A vector of observed CPUE values.

cpue_sd

A vector of observation standard deviations for each observation.

cpue_a1

Integer minimum age index for CPUE calculation.

cpue_a2

Integer maximum age index for CPUE calculation.

par_log_cpue_q

Numeric log-scale catchability coefficient.

par_log_cpue_sigma

Numeric log-scale process error SD.

par_log_cpue_omega

Numeric log-scale power parameter for scaling.

par_cpue_creep

Numeric technological creep rate.

creep_init

Numeric initial value for the technological creep adjustment (default = 1).

number_ysa

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

sel_fya

A 3D array of selectivity values with dimensions fishery by year by age.

Value

A list containing:

unscaled

Vector of unscaled log-predictions (required for simulation).

lp

Vector of negative log-likelihood contributions for each observation.