Generate model predictions for a specific survey date
Source:R/ageDensity.R
generate_model_predictions_for_date.Rd
Calculates the probability P(K | length) that a fish in a given length class is observed with K annuli.
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
Greens function matrix (rows = ages, cols = length classes).
- a
Numeric vector of high-resolution ages corresponding to rows of
G
.- l
Numeric vector of lengths 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)
#> K
#> Length 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