Skip to contents

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

Usage

get_POP_like(pop_switch = 1, pop_obs, paly, phi_ya, spawning_biomass_y)

Arguments

pop_switch

Integer flag for activation (0=off, 1=on).

pop_obs

A matrix of parent-offspring pairing observations.

paly

A 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.

Value

A list containing:

pop_prob

Vector of predicted parent-offspring pairing probabilities.

lp

Vector of negative log-likelihood contributions for each observation.