Age-structured and age- and length-structured statistical catch-at-length models for fisheries stock assessment

ALSCL is an R package for fitting population models to fishery-independent survey length data using Template Model Builder (TMB). It provides the age-structured catch-at-length model (ACL) and the age- and length-structured statistical catch-at-length model (ALSCL), together with simulation, diagnostics, model comparison and plotting tools.

The model framework is based on Zhang & Cadigan (2022). Choose a starting point below; the Contents lists all basic guides, and Articles contains worked cases.

Where would you like to start?

  1. Try ALSCL for the first time
    Install the package, fit the bundled example, check the fit and plot the estimates.
  2. Fit your own survey data
    Prepare three aligned tables, choose biological inputs and inspect which parameters will be estimated.
  3. Check a model with simulation or future observations
    Generate repeat datasets, or assess predictions for time steps left out of fitting.

Contents

Installation

Install ALSCL 2.5.3 from GitHub:

install.packages("remotes")
remotes::install_github("FanZhang-LAB-SHOU/ALSCL")
library(ALSCL)

Fitting compiles the bundled TMB models, so an R-compatible C++ toolchain is required. See installation and compilation for platform-specific guidance.

The website describes ALSCL 2.5.3; see News for the changes in each release.

Two model structures

ACL ALSCL
Population state Numbers by age and time Numbers by length, age and time
Length and growth representation Age-length probability matrix Age-length probability matrix for recruitment and initialization; growth transition matrix for survivors
Fishing mortality Estimated by age Estimated by length; age-specific F is derived
Fitting function run_acl() run_alscl()

Both models use three aligned input tables: survey numbers-at-length, mean individual weight-at-length, and maturity-at-length. Natural mortality and survey catchability settings are supplied. Their assumptions affect the scale and interpretation of the estimates; see Model principles.

Basic use

The bundled YTF_example contains survey data simulated using the biological parameters in YTF, along with the settings and known population quantities used in the simulation.

data("YTF_example")
x <- YTF_example
a <- run_acl(x, silent = TRUE)    # age-structured model; the first call compiles it
b <- run_alscl(x, silent = TRUE)  # age- and length-structured model; about two minutes
diagnose_model(x$data.CatL, a)    # check first; expect Numerical checks: TRUE
diagnose_model(x$data.CatL, b)
plot_compare_ts(a, b, se = TRUE)

run_acl(x) and run_alscl(x) read the same input bundle x (three tables plus settings) and each selects its own stored configuration. Understand your first fit explains the fitted object, the checks and the estimates step by step; Choose the fitting settings explains what you can change, and Speed settings how to use several cores.

Spawning stock biomass, recruitment, total biomass, total abundance and catch in numbers estimated by ACL and ALSCL for the synthetic YTF example

The example fixes selected biological and process parameters. Its uncertainty intervals are conditional on those settings. The worked example explains the inputs, fitted objects and data provenance.

Check and interpret the fit

diagnose_model(x$data.CatL, b)
plot_residuals(b, facet_by = "year")
comparison <- compare_models(a, b, x$data.CatL)
comparison$summary

Read the numerical checks first (convergence code, gradient, Hessian, bounds, parameters at their limit), then the residual patterns, then the sensitivity to the fixed inputs such as natural mortality and survey catchability. Judge whether a fit can be used walks through these checks and Model comparisons shows the comparison figures.

Basic functions

Getting started and data

Install ALSCL, prepare the survey tables, and fit the worked YTF example.

Install and run a first fit

Install the compiler and the package, load the example data, fit one model and read its numerical checks.

Understand your first fit

What a fitted object contains, how to judge it, how to read the estimates, and how ACL and ALSCL compare.

Prepare your survey data

Lay out the three tables, choose the time step, read the files, add the biology and check the bundle before fitting.

Model structure and fitting

Understand the model assumptions and time scales, then choose initial values, bounds and estimated parameters.

Model principles

Learn how ACL and ALSCL represent population dynamics, growth, recruitment, fishing mortality and observation error, including the units of each time step.

Choose the fitting settings

Decide which parameters are estimated or fixed, set starting values and bounds, choose the F structure and control the optimizer.

Estimation parameter lists

Review all scalar estimation keys, their optimizer-scale transformations, initial values and lower and upper bounds.

Speed settings

How fits use several cores for standard errors, how much faster they become, how to check and record the settings, and when to use the TMBad option.

Diagnostics and model comparison

Check fits and residuals, compare model results, and assess retrospective patterns.

Judge whether a fit can be used

Numerical checks, residual patterns, comparison of configurations and sensitivity to the fixed values.

Model comparisons

Use compare_models() and the plot_compare_*() functions to compare fitted quantities, observation fits and diagnostics on a common data window.

Run a retrospective analysis

Refit shortened series with retro_acl() or retro_alscl(), then visualize revisions with plot_retro() and interpret Mohn's rho.

Assessment workflows: from bundle to saved results

Prepare inputs, inspect maps, extract and save results, check residuals, run sensitivity analyses and likelihood profiles, project conditional scenarios and summarize simulations.

Plots and figure export

Visualize survey data, population quantities, growth, mortality and residuals; customize and export figures.

Survey and population plots

Plot survey numbers, abundance, biomass, spawning stock biomass, recruitment and catch with the population plotting functions.

Growth, mortality and residuals

Inspect growth curves, age-length probabilities, fishing mortality and residual structure using plot_VB(), plot_pla(), plot_fishing_mortality() and related plots.

Colors and export

Choose with acl_theme_set() between the default style and the look of earlier versions, give your own ggplots the same look with theme_acl() and acl_palette(), and save figures at their recommended size with acl_save_plot() or at a size of your choice.

Simulation and time steps

Generate data with known truth and explore annual and quarterly assessment workflows.

Simulate survey data

Choose simple teaching data, operating-model experiments, or simulation from a fitted assessment. Keep the generating assumptions and truth with each replicate.

Annual and quarterly time steps

Understand how annual flatfish and quarterly tuna presets differ in time steps, biology and operating-model structure. Both examples are simulated.

Reproducibility and troubleshooting

Save analysis settings, record the computing environment, and resolve common data and compilation issues.

Reproduce results and fix problems

Record assumptions, software versions and fit diagnostics; manage compilation caches and distinguish saved summaries from live TMB objects.

Getting help

Use the GitHub issue tracker for bugs and feature requests. Include a small reproducible example, the package version, input dimensions and the output of sessionInfo(). Check troubleshooting for common data and compilation problems.

Citation

Zhang, F. & Cadigan, N. G. (2022). An age- and length-structured statistical catch-at-length model for hard-to-age fisheries stocks. Fish and Fisheries, 23(5), 1121-1135. doi:10.1111/faf.12673.

Related application: Antarctic krill

Dong, S., Zhang, F. & Zhu, G. (2025). Length-dependent growth and mortality within each cohort cannot be ignored in stock assessment: a case study of Antarctic krill Euphausia superba. Marine Ecology Progress Series, 769, 1-22. doi:10.3354/meps14923.

This study applies ACL and ALSCL to Antarctic krill to examine how length-dependent growth and mortality within cohorts affect assessment results.

citation("ALSCL") prints the model paper and the reference of the package. When reporting analyses, also record the ALSCL version, code revision, data source and fitted assumptions.

Search documentation