Skip to contents

Computes the negative log-likelihood for observed parent-offspring pairings from genetic samples.

Usage

get_POP_like(
  pop_switch = 1L,
  pop_obs,
  paly,
  phi_ya,
  spawning_biomass_y,
  pop_od = 50L
)

Arguments

pop_switch

Integer flag for likelihood type: 0=off, 1=binomial, 2=beta-binomial.

pop_obs

A matrix of parent-offspring pairing observations.

paly

An array of probability by length, age, and year.

phi_ya

A matrix of reproductive output-at-age with dimensions year by age.

spawning_biomass_y

A vector of spawning biomass values indexed by year.

pop_od

Numeric positive concentration parameter for the beta-binomial likelihood (default = 50).

Value

A list containing:

pop_prob

Vector of predicted parent-offspring pairing probabilities.

lp

Vector of negative log-likelihood contributions for each observation.