Skip to contents

Obtain dl for use later in calculating phi. This function is used within the get_data function so it is generally not needed directly.

Usage

get_dl(length_mu_ysa, length_sd_a)

Arguments

length_mu_ysa

A numeric array with dimensions \[year, season, age\] containing the mean length (cm) at age for each year and season. Must have exactly 2 seasons.

length_sd_a

A numeric vector containing the standard deviation of length at age. Length must equal the number of age classes.

Value

A numeric array with dimensions \[year, age, bin\] containing the normalized probability density across 15 length bins for each year and age.

Details

Obtain dl for use later in calculating phi(a, y). From the PRELIMINARY_CALCS_SECTION of sbtmod.tpl. More fine-scale than lenage_dist_syal. Needs a bit more detail to get it right. Integrates over length-at-age distribution to get phi(age,year).

Examples

length_mu_ysa <- get_length_at_age(length_mean = sbt::length_mean)
dl_yal <- get_dl(length_mu_ysa = length_mu_ysa, length_sd_a = sbt::length_sd$SD)