Skip to contents

Model Setup

Functions for setting up a SPoRC model

Setup_Mod_Biologicals()
Set up biological inputs for the estimation model
Setup_Mod_Catch_and_F()
Set up fishing mortality, discard mortality, and catch observation inputs
Setup_Mod_FishIdx_and_Comps()
Set up discards, fishery index, age composition, and length composition inputs
Setup_Mod_Fishsel_and_Q()
Set up total and retained fishery selectivity and catchability specifications
Setup_Mod_Movement()
Set up movement model inputs and parameter structures
Setup_Mod_Weighting()
Set likelihood and penalty weights for the estimation model
Setup_Mod_Rec()
Set up the recruitment module and associated processes
Setup_Mod_SrvIdx_and_Comps()
Set up observed survey indices and composition data
Setup_Mod_Srvsel_and_Q()
Set up survey selectivity and catchability specifications
Setup_Mod_Tagging()
Set up the conventional tagging module for model fitting
Setup_Mod_Dim()
Initialise model dimension settings

Reference Points and Projections

Functions for deriving reference points and catch projections

Do_Population_Projection()
Do Population Projections
Get_Reference_Points()
Compute fishing and biological reference points from an assessment or simulation
get_key_quants()
Generate Key Projection Quantities and Table Plot

Simulation Setup

Functions for setting up simulations

Setup_Sim_Biologicals()
Set up biological parameter inputs for closed-loop simulation
Setup_Sim_Containers()
Initialise output containers for the operating model simulation
Setup_Sim_Fishing()
Setup Simulation Fishing Inputs
Setup_Sim_Rec()
Set up recruitment dynamics for the operating model simulation
Setup_Sim_Survey()
Set up survey parameterisation for the operating model simulation
Setup_Sim_Tagging()
Set up conventional tagging dynamics for the operating model simulation
Setup_Sim_Dim()
Initialise simulation dimension settings
Setup_sim_env()
Construct and populate a simulation execution environment
run_annual_cycle()
Run the annual cycle for a single simulation year
Simulate_Pop_Static()
Simulate a static (open-loop) spatial age- and sex-structured population
simulation_self_test()
Run a simulation self-test of a fitted RTMB estimation model
simulation_data_to_SPoRC()
Extract simulation outputs into SPoRC estimation model format

Closed-Loop Simulation

Functions for setting up and running closed-loop population simulations

condition_closed_loop_simulations()
Construct and Condition Closed-Loop Simulation Inputs
get_closed_loop_reference_points()
Get Closed Loop Reference Points
catch_to_F_singlefleet()
Convert a target catch to fishing mortality for a single fleet via bisection
catch_to_F_multifleet()
Convert target catches to fishing mortality rates for multiple fleets

Francis Reweighting

Functions for setting up Francis Reweighting

run_francis()
Run Iterative Francis Reweighting Procedure
do_francis_reweighting()
Get Francis Weights

Model Diagnostics

Functions for model diagnostics

do_jitter()
Run Jitter Analysis for Model Diagnostics
do_retrospective()
Run Retrospective Diagnostics for RTMB Models
get_retrospective_relative_difference()
Derive relative difference from terminal year from a retrospective analysis.
do_runs_test()
Runs Test for Residual Randomness
get_idx_fits()
Extract Index Fit Results
get_comp_prop()
Get Composition Proportions from RTMB Output
get_osa()
Compute OSA residuals for composition data
plot_resids()
Plot OSA residuals from outputs of get_osa
get_nLL_plot()
Get Plot of Negative Log Likelihood Values
get_idx_fits_plot()
Get Index Fits Plot
get_catch_fits_plot()
Get Catch and Discard Fits Plot
get_retrospective_plot()
Get Retrospective Plot
do_likelihood_profile()
Run Likelihood Profile
get_model_rep_from_mcmc()
Extract model report quantities from MCMC posterior samples
marg_AIC()
Compute the corrected marginal AIC (AICc)

Utility

Functions for convenience

fit_model()
Fit a SPoRC RTMB model
set_data_indicator_unused()
Set data indicators to unused for specified years
post_optim_sanity_checks()
Run post-optimisation convergence checks on a fitted SPoRC model
get_par_est_info()
Extract and tabulate parameter estimates and metadata from a fitted SPoRC model
rho_trans()
Transform a real-valued parameter to the interval (-1, 1)
get_logistN_Sigma()
Construct a logistic-normal covariance matrix

Plotting

Functions for plotting

get_ts_plot()
Get Time Series Plots
get_selex_plot()
Get Fishery and Survey Selectivity Plots
get_biological_plot()
Get Plots of Biological Quantities
get_data_fitted_plot()
Get Data Fitted to Plot
plot_all_basic()
Plotting Function for All Basic Quantities
theme_sablefish()
ggplot2 theme for SPoRC plots

Data

Data objects provided by SPoRC

sgl_rg_sable_data
Sablefish data for single region case study
mlt_rg_sable_data
Sablefish data for multi region (5 area) case study
sgl_rg_ebswp_data
EBS Walleye Pollock data for single region case study
three_rg_sable_data
Sablefish data for multi region (3 area) case study
three_rg_sable_rep
Sablefish report for 3 region case study
sgl_rg_sable_rep
Sablefish report for single region case study
mlt_rg_sable_rep
Sablefish report for 5 region case study
sgl_rg_dusky_data
Dusky data for single region assessment case study
dusky_rtmb_model
Dusky model outputs from single regino model