Skip to contents

Computes the log-likelihood for troll CPUE data using a lognormal distribution.

Usage

get_troll_like(
  troll_switch = 0,
  troll_years,
  troll_obs,
  troll_sd,
  log_troll_tau = log(0.3689704),
  number_ysa
)

Arguments

troll_switch

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

troll_years

A vector of year indices for each troll CPUE observation.

troll_obs

A vector of observed troll index values.

troll_sd

A vector of observation standard deviations for each observation.

log_troll_tau

Numeric process error standard deviation (default = 0.3689704).

number_ysa

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

Value

A list containing:

pred

Vector of predicted troll index values.

resid

Vector of standardized residuals.

lp

Vector of negative log-likelihood contributions for each observation.