Double Logistic Selectivity (3-parameter formulation)

Results and parameterization from double_logistic_selectivity.R

Published

2026-02-02 11:46

1 Overview

This document summarizes the 3-parameter double logistic selectivity curve used for prior elicitation in the EBS pollock assessment workflow. The content and plots below are based on double_logistic_selectivity.R and are intended as a starting point for an RTMB prior demonstration.

2 Model definition

Let age be \(a\), with parameters \(p_1\), \(p_2\), and \(p_3\) and derived inflection points \(\gamma_1\) and \(\gamma_2\):

\[ \gamma_1 = p_1 + p_2, \qquad \gamma_2 = 2p_1 + p_2 + p_3. \]

The ascending limb is a standard logistic and the descending limb is one minus a logistic:

\[ \text{asc}(a) = \frac{1}{1 + \exp\left[-\log(19)\,\frac{a - \gamma_1}{p_1}\right]}, \]

\[ \text{desc}(a) = 1 - \frac{1}{1 + \exp\left[-\log(19)\,\frac{a - \gamma_2}{p_3}\right]}. \]

The full double logistic selectivity is

\[ \text{sel}(a) = \min\left(1,\ \frac{\text{asc}(a)\,\text{desc}(a)}{0.95^2}\right). \]

2.1 Interpretation

  • \(p_1 > 0\) controls the ascending slope and is the distance from \(\gamma_1\) (50 percent selectivity) to the 95 percent point.
  • \(p_2\) shifts the ascending limb through \(\gamma_1 = p_1 + p_2\).
  • \(p_3 > 0\) controls the descending slope and is the distance from \(\gamma_2\) (50 percent on the descending limb) to the 5 percent point.
  • The dome width is \(\gamma_2 - \gamma_1 = p_1 + p_3\).
  • The factor \(0.95^{-2}\) normalizes the curve so that when both limbs are at 0.95 the product is near 1 (then capped at 1.0).

3 Scenarios used in double_logistic_selectivity.R

scenario p1 p2 p3 gamma1 gamma2 dome_width
Wide dome 2.0 4 2.5 6.0 10.5 4.5
Asymmetric
(fast rise, slow decline) 0.8 4 3.0 4.8 8.6 3.8
Asymmetric
(slow rise, fast decline) 2.0 3 0.8 5.0 7.8 2.8
Nearly asymptotic 1.5 4 8.0 5.5 15.0 9.5
Table 1: Scenario parameters and derived inflection points

The scenario summary in Table 1 lists the four parameter sets and the derived inflection points (\(\gamma_1\), \(\gamma_2\)) used in the selectivity scenarios.

4 Faceted scenario curves

Each scenario appears on its own panel in Figure 1 so the ascent, descent, and dome width can be compared against the 50 and 95 percent reference lines.

Figure 1: Double logistic selectivity for each parameter scenario.

5 Overlay comparison

All scenarios are overlaid in Figure 2 to highlight differences in peak age and decline shape when the curves are viewed on a common axis.

Figure 2: All scenarios overlaid for direct comparison.

6 Parameter sensitivity analysis

The three panels in Figure 3 show how each parameter changes the curve when the other two are held fixed.

Figure 3: Sensitivity to p1, p2, and p3 with other parameters fixed.

7 RTMB draft with priors

A common approach is to estimate on the log scale for the positive parameters and apply lognormal priors on \(p_1\) and \(p_3\):

\[ \log(p_k) \sim \mathcal{N}(\mu_k, \sigma_k^2), \qquad k \in \{1, 3\}. \]

If using a lognormal prior specified by median \(m\) and coefficient of variation \(\text{CV}\) on the natural scale, a convenient conversion is

\[ \mu = \log(m), \qquad \sigma = \sqrt{\log(\text{CV}^2 + 1)}. \]

Parameter \(p_2\) can remain unconstrained (normal prior) or be modeled on the log scale if you want to enforce \(p_2 > 0\).

The draft RTMB objective below is set up for a single selectivity curve with Gaussian observation error and priors on \(p_1\), \(p_2\), and \(p_3\). Replace sel_obs and sel_sd with observed selectivity or pseudo-data for a prior conditioning exercise.

outer mgc:  0 
outer mgc:  0 
outer mgc:  0.006737636 
outer mgc:  0.006737636 
outer mgc:  0.001 
outer mgc:  0.001 
outer mgc:  0.003252194 
outer mgc:  0.003252194 
outer mgc:  2.5 


Gradient evaluation took 4.5e-05 seconds
1000 transitions using 10 leapfrog steps per transition would take 0.45 seconds.
Adjust your expectations accordingly!



 Elapsed Time: 0.019 seconds (Warm-up)
               0.125 seconds (Sampling)
               0.144 seconds (Total)



Model 'selectivity_set1' has 3 pars, and was fit using NUTS with a 'diag' metric
1 chain(s) of 1300 total iterations (150 warmup) were used
Average run time per chain was 0.14 seconds 
Minimum ESS=360.7 (31.37%), and maximum Rhat=1.015
There were 0 divergences after warmup

8 MCMC evaluations

Figure 4: Marginal posterior distributions for selectivity parameters (SparseNUTS, prior set 1).

The marginal posterior densities in Figure 4 summarize \((p_1, p_2, p_3)\) under prior set 1, highlighting the implied uncertainty in each parameter.

Figure 5: Pairwise posterior scatterplots for selectivity parameters (SparseNUTS, prior set 1).

Pairwise posterior relationships in Figure 5 show \((p_1, p_2, p_3)\) and are useful for diagnosing parameter correlations and non-linear structure.

Figure 6: MCMC selectivity draws for prior set 1 (p1 median 1.5, p3 median 2.5, p2 sd 1).

Posterior selectivity draws in Figure 6 show the spread of age-specific selectivity implied by prior set 1.



Gradient evaluation took 2.5e-05 seconds
1000 transitions using 10 leapfrog steps per transition would take 0.25 seconds.
Adjust your expectations accordingly!



 Elapsed Time: 0.018 seconds (Warm-up)
               0.118 seconds (Sampling)
               0.136 seconds (Total)



Model 'selectivity_set2' has 3 pars, and was fit using NUTS with a 'diag' metric
1 chain(s) of 1300 total iterations (150 warmup) were used
Average run time per chain was 0.14 seconds 
Minimum ESS=393.8 (34.24%), and maximum Rhat=1.003
There were 0 divergences after warmup


Gradient evaluation took 2.2e-05 seconds
1000 transitions using 10 leapfrog steps per transition would take 0.22 seconds.
Adjust your expectations accordingly!



 Elapsed Time: 0.017 seconds (Warm-up)
               0.12 seconds (Sampling)
               0.137 seconds (Total)



Model 'selectivity_set3' has 3 pars, and was fit using NUTS with a 'diag' metric
1 chain(s) of 1300 total iterations (150 warmup) were used
Average run time per chain was 0.14 seconds 
Minimum ESS=427 (37.13%), and maximum Rhat=1.005
There were 0 divergences after warmup
Figure 7: MCMC selectivity draws for prior set 2 (p1 median 1.5, p3 median 8, p2 sd 1).

The selectivity draws in Figure 7 show prior set 2, which widens the dome by increasing the median of \(p_3\).

Figure 8: MCMC selectivity draws for prior set 3 (p1 median 1.5, p3 median 8, p2 sd 2).

Posterior draws in Figure 8 emphasize how a larger \(p_2\) standard deviation shifts the curves horizontally under prior set 3.

9 Parameter correlations

After fitting, use sdreport() to extract the covariance matrix and convert to correlation with cov2cor(). cov.fixed is on the estimation scale (log_p1, p2, log_p3), while cov.report is on the reported scale (p1, p2, p3) if you used ADREPORT().

The heatmap in ?@fig-dl-corr-heatmap visualizes the natural-scale correlation structure among \((p_1, p_2, p_3)\) and helps identify any strong dependencies implied by the fitted model.