Obtain the common normalized 15-bin integration weights used by the current
RTMB model when calculating phi. The original ADMB model stored these weights
as dl(y, a, l), but the grid is defined in standardized normal units
from -1.98 to 1.98 standard deviations. After normalization the
weights are therefore the same for every year and age as long as the lower
length bound is not truncated at zero.
Arguments
- length_mu_ysa
A numeric
arraywith 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
vectorcontaining the standard deviation of length at age. Length must equal the number of age classes.- n_bins
Whole-number count of integration bins. It must be at least 2 and defaults to 15, matching
sbtmod.tpl.
Examples
data <- sbt_example_data()
dl_l <- get_dl(
length_mu_ysa = data$length_mu_ysa,
length_sd_a = data$length_sd_a
)
