Skip to contents

Obtain the ADMB-compatible dl array for use later in calculating phi in the version 1 model. This function is used within the get_data_v1 function so it is generally not needed directly.

Usage

get_dl_v1(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

data <- sbt_example_data()
dl_yal <- get_dl_v1(
  length_mu_ysa = data$length_mu_ysa,
  length_sd_a = data$length_sd_a
)