Skip to contents

Computes the negative log-likelihood for half-sibling pair observations based on reproduction and survival.

Usage

get_HSP_like(
  hsp_switch,
  hsp_obs,
  hsp_q,
  hsp_false_negative,
  number_ysa,
  phi_ya,
  M_a,
  spawning_biomass_y,
  hrate_ysa
)

Arguments

hsp_switch

Integer flag for activation.

hsp_obs

Matrix n,5 with columns: cohort1, cohort2, cohort difference, comparisons, matches.

hsp_q

Effective sampling fraction of potential parents.

hsp_false_negative

Probability of detecting a true match (1 – false negative rate).

number_ysa

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

phi_ya

Matrix year, age of reproductive output-at-age.

M_a

Vector of natural mortality at age.

spawning_biomass_y

Vector of spawning biomass by year.

hrate_ysa

3D array year, season, age of harvest rates.

Value

Vector of negative log-likelihood contributions for each observation.