Skip to contents

Calculate CPUE Likelihood (Version 1)

Usage

get_cpue_like_v1(
  cpue_switch,
  cpue_a1 = 5,
  cpue_a2 = 17,
  cpue_years,
  cpue_obs,
  cpue_adjust,
  cpue_sigma,
  cpue_omega,
  log_cpue_q,
  number_ysa,
  sel_fya
)

Arguments

cpue_switch

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

cpue_a1

An integer scalar, minimum age for CPUE calculation (default 5).

cpue_a2

An integer scalar, maximum age for CPUE calculation (default 17).

cpue_years

An integer vector, year indices for CPUE observations.

cpue_obs

A numeric vector, observed CPUE values.

cpue_adjust

A numeric vector, adjustment factors for CPUE.

cpue_sigma

A numeric scalar, observation error standard deviation.

cpue_omega

A numeric scalar, power parameter for abundance scaling.

log_cpue_q

A numeric scalar, log-catchability coefficient.

number_ysa

A numeric array of dimensions \[n_year + 1, n_season, n_age\], numbers-at-age.

sel_fya

A numeric array of dimensions \[n_fishery, n_year, n_age\], selectivity-at-age.

Value

A list containing:

pred

Predicted CPUE values (numeric vector)

resid

Standardized residuals (numeric vector)

lp

Negative log-likelihood values (numeric vector)