Skip to contents

Calculate Troll Survey Likelihood (Version 1)

Usage

get_troll_like_v1(
  troll_switch,
  troll_years,
  troll_obs,
  troll_sd,
  troll_tau,
  number_ysa
)

Arguments

troll_switch

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

troll_years

An integer vector, year indices for troll survey observations.

troll_obs

A numeric vector, observed troll survey values.

troll_sd

A numeric vector, observation error standard deviations.

troll_tau

A numeric scalar, additional variance parameter.

number_ysa

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

Value

A list containing:

pred

Predicted troll survey values (numeric vector)

resid

Standardized residuals (numeric vector)

lp

Negative log-likelihood values (numeric vector)