Skip to contents

Calculate POP Likelihood (Version 2)

Usage

get_POP_like_v2(pop_switch, pop_obs, phi_ya, paly, spawning_biomass_y)

Arguments

pop_switch

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

pop_obs

A numeric matrix with columns including cohort, year, age/length, type flag, number of POPs, number of comparisons.

phi_ya

A numeric matrix of dimensions \[n_year + 1, n_age\], reproductive output-at-age.

paly

A numeric array, probability-at-length-year-age.

spawning_biomass_y

A numeric vector of length n_year + 1, spawning biomass by year.

Value

A numeric vector of negative log-likelihood values for each POP observation.