Generate age-at-length distribution for a specific survey date
Source:R/ageDensity.R
generate_model_predictions_for_date.RdCalculates the model probability distribution \(P(K | l)\) for the number of anulli \(K\) in all length classes \(l\) for a given survey.
Usage
generate_model_predictions_for_date(
survey_date,
G,
a,
l,
mu,
kappa,
annuli_date,
annuli_min_age
)Arguments
- survey_date
Numeric survey date (e.g., 2023.25).
- G
Impulse-response matrix from the single-cohort simulation (rows = ages, cols = length classes).
- a
Numeric vector of high-resolution ages corresponding to rows of
G.- l
Numeric vector of length-class centers corresponding to columns of
G.- mu
Mean spawning date as a fraction of a year in [0, 1).
- kappa
Spawning concentration parameter.
- annuli_date
Ring formation day as fraction of a year in [0, 1).
- annuli_min_age
Minimum age (years) at which the first ring can form.
Examples
# Minimal schematic example (using toy inputs)
a <- seq(0, 3, length.out = 5)
l <- seq(10, 30, length.out = 3)
G <- matrix(abs(sin(outer(a, l, "+"))), nrow = length(a))
generate_model_predictions_for_date(2023.5, G, a, l, mu = 0.5, kappa = 3,
annuli_date = 0.25, annuli_min_age = 0.5)
#> 0 1 2 3
#> 10 0.5281034 0.04898685 0.015036502 0.4078732
#> 20 0.5015673 0.02652226 0.007001495 0.4649090
#> 30 0.4806103 0.01506286 0.017937671 0.4863892