Skip to contents

Model Setup

Functions for setting up a SPoRC model

Setup_Mod_Biologicals()
Setup biological inputs for estimation model
Setup_Mod_Catch_and_F()
Setup fishing mortality and catch observations
Setup_Mod_FishIdx_and_Comps()
Setup observed fishery indices and composition data (age and length comps)
Setup_Mod_Fishsel_and_Q()
Setup fishery selectivity and catchability specifications
Setup_Mod_Movement()
Setup Movement Processes for SPoRC
Setup_Mod_Weighting()
Set up SPoRC model weighting
Setup_Mod_Rec()
Setup model objects for specifying recruitment module and associated processes
Setup_Mod_SrvIdx_and_Comps()
Setup observed survey indices and composition data (age and length comps)
Setup_Mod_Srvsel_and_Q()
Setup survey selectivity and catchability specifications
Setup_Mod_Tagging()
Setup tagging processes and parameters
Setup_Mod_Dim()
Set up model dimensions

Reference Points and Projections

Functions for deriving reference points and catch projections

Do_Population_Projection()
Do Population Projections
Get_Reference_Points()
Wrapper function to get reference points
get_key_quants()
Generate Key Projection Quantities and Table Plot

Simulation Setup

Functions for setting up simulations

Setup_Sim_Biologicals()
Set up simulation containers and inputs for biological parameters
Setup_Sim_Containers()
Setup containers for simulation and output
Setup_Sim_Fishing()
Setup values and dimensions of fishing processes
Setup_Sim_Rec()
Set up recruitment dynamics for simulation
Setup_Sim_Survey()
Setup values for survey parameterization
Setup_Sim_Tagging()
Set up simulated tagging dynamics
Setup_Sim_Dim()
Initialize Simulation Dimension Settings
Setup_sim_env()
Constructs simulation objects in a new simulation environment for use in simulation functions
run_annual_cycle()
Run Annual Cycle in Simulation Environment
Simulate_Pop_Static()
Simulates a static spatial, sex, and age-structured population (no feedback loop)
simulation_self_test()
Conduct a Simulation Self Test
simulation_data_to_SPoRC()
Extract simulation data into SPoRC format

Closed-Loop Simulation

Functions for setting up and running closed-loop population simulations

condition_closed_loop_simulations()
Set up simulation list for closed-loop projections
get_closed_loop_reference_points()
Get Closed Loop Reference Points
bisection_F()
Go from TAC to Fishing Mortality using bisection

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
do_retrospective()
Run retrospective analyses for RTMB models
get_retrospective_relative_difference()
Derive relative difference from terminal year from a retrospective analysis.
do_runs_test()
Runs test function taken from SS3 diags.
get_idx_fits()
Gets index fits results
get_comp_prop()
Gets composition data proportions normalized according to the assessment specifications from RTMB
get_osa()
Compute OSA residuals for composition data
plot_resids()
Plots OSA residuals from outputs from get_osa. Much of this code is taken from the afscOM package, but with modificaitons to plot features.
get_nLL_plot()
Get plot of negative log likelihood values
get_idx_fits_plot()
Get Index Fits Plot
get_catch_fits_plot()
Title Get Catch Fits Plot
get_retrospective_plot()
Get Retrospective Plot
do_likelihood_profile()
Run Likelihood Profile
get_model_rep_from_mcmc()
Extract model report from MCMC posterior samples

Utility

Functions for convenience

fit_model()
Run RTMB model
set_data_indicator_unused()
Set Data Indicators to Unused for Specified Years
post_optim_sanity_checks()
Post Optimization Model Convergence Checks
get_par_est_info()
Helper function for extracting parameter information and names from TMB
rho_trans()
Title Constrains value between -1 and 1
get_logistN_Sigma()
Construct 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()
ggplot theme for sablefish

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
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