On this page

All 81 exported functions, grouped by task. Signatures and defaults are read directly from the R source when this website is built.

Prepare data and inspect parameters

read_survey_csv()Read the survey index, weight and maturity tables from three CSV files
read_survey_excel()Read the survey index, weight and maturity tables from an Excel workbook
prepare_alscl_data()Prepare an input bundle from three tables, three CSV files or an Excel workbook
check_alscl_data()Check an input bundle and the model settings before compiling or fitting
inspect_parameters()Inspect the starting values, bounds and map settings that a fit uses

Fit models

run_acl()Fit the age-structured ACL model
run_alscl()Fit the age- and length-structured ALSCL model
alscl_speed()Set the speed options of model fitting
alscl_speed_info()Show how fits will use the speed settings
create_parameters()Create the starting values and bounds of ACL or ALSCL parameters
create_parameters_alscl()Create the starting values and bounds of ALSCL parameters
generate_map()Merge the default ACL map with a custom map
lorenzen_M()Calculate the natural mortality rate as a power function of length
survey_catchability()Calculate survey catchability at length for logistic and dome-shaped curves

Extract, save and reload results

extract_parameters()Extract parameter estimates with their scale and estimation status
extract_estimates()Extract population estimates with their time and age or length coordinates
length_at_age()Calculate mean length at age and its standard deviation from a fit
ssb_at_age()Calculate spawning stock biomass from maturity at age
relative_catch()Calculate catch relative to its mean by time step
save_assessment()Save a fit with the inputs and settings needed to refit it
read_assessment()Read a saved fit
refit_model()Refit a model from its saved inputs and settings

Diagnostics and retrospectives

check_fit()Check the conditional residuals of the survey index with a heat map, lag correlations and a QQ plot
diagnose_model()Summarize the numerical checks of a fit
diagnostic_metrics()Calculate in-sample errors of the survey-index fit and information criteria
compare_models()Compare two fits of the same survey data
retro_model()Run a retrospective analysis of an ACL or ALSCL fit
retro_acl()Run a retrospective analysis of an ACL fit
retro_alscl()Run a retrospective analysis of an ALSCL fit
plot_retro()Plot the estimates of each peel of a retrospective analysis with the full fit

Sensitivity, profiles and projections

fit_scenarios()Fit named sensitivity scenarios to the same observations
profile_model()Fix one free scalar parameter at each grid value and reoptimize the other parameters
project_model()Project deterministic population scenarios under stated assumptions from the last time step of a fit

Simulation and prediction checks

simulate_fit()Simulate survey datasets from a fitted model
self_test()Refit a model to data simulated from its fit and compare the estimates with the values used to simulate
plot_self_test()Plot the relative errors of a self-test
hindcast_model()Fit earlier time steps and score the survey-index predictions for the time steps left out
sim_model()Fit saved simulation replicates with ACL or ALSCL
sim_acl()Fit simulation replicates with ACL
sim_alscl()Fit simulation replicates with ALSCL
summarize_simulations()Summarize the bias, RMSE, interval coverage, fitting failures and run time of simulations

Biology and operating-model simulations

VB_func()Calculate mean length from the von Bertalanffy growth function
mat_func()Calculate the proportion mature from a logistic curve
initialize_params()Create the parameters of an operating-model simulation
sim_cal()Calculate the biological arrays of a simulation from its parameters
sim_data()Run the full stochastic population simulation
simulation_to_tables()Convert one simulated replicate to the tables used for fitting
simulate_example_data()Generate small annual teaching datasets

Survey and population plots

plot_CatL()Plot observed and fitted survey indices at length
plot_abundance()Plot abundance over time
plot_biomass()Plot biomass over time
plot_SSB()Plot spawning stock biomass over time
plot_catch()Plot catch in numbers in total and at age or length
plot_relative_catch()Plot relative catch by time step
plot_recruitment()Plot recruitment over time
plot_SSB_Rec()Plot recruitment against spawning stock biomass

Growth, mortality and residuals

plot_VB()Plot mean length at age from the von Bertalanffy curve or the fitted numbers
plot_length_at_age()Plot mean length at age by time step
plot_pla()Plot the probability of length given age
plot_fishing_mortality()Plot fishing mortality by age or length
plot_natural_mortality()Plot the natural mortality rate used in a fit
plot_survey_catchability()Plot the survey catchability used in a fit
plot_residuals()Plot log residuals of the survey index by time step or length bin
plot_deviance()Plot the process deviations of recruitment and fishing mortality
plot_ridges()Plot observed and fitted survey length compositions by time step

Compare models visually

plot_compare_ts()Compare the population time series of two fits
plot_compare_CatL()Compare the fitted survey indices at length of two fits
plot_compare_F()Compare the fishing mortality heat maps of two fits
plot_compare_F_ts()Compare fishing mortality by time step between two fits
plot_compare_growth()Compare mean length at age between two fits
plot_compare_selectivity()Compare supplied survey catchability at length
plot_compare_residuals()Compare the residual diagnostics of two fits
plot_compare_metrics()Compare the fit statistics of two fits
plot_compare_annual_F()Deprecated, use plot_compare_F_ts()

Plot appearance

acl_theme()Read the ALSCL plot theme settings
acl_theme_set()Set the ALSCL plot theme
acl_theme_reset()Reset the ALSCL plot theme to its defaults
theme_acl()Theme of the ALSCL plots for your own ggplots
acl_palette()Colors of the ALSCL plots
acl_figure_size()Recommended size of a saved figure
acl_save_plot()Save a plot at its recommended size

Datasets

See the worked YTF example for YTF_example, the biological parameter list YTF, and the legacy tables example_data. whiting_example holds the North Sea whiting survey index of 1983-2026 with the tables used to check a fit; see What can a fit to a real survey be used for?.

Search documentation