Package: SPoRC 1.1.1

Matthew Cheng

SPoRC: A Generalized Stochastic (S) Population (Po) Model Over Regional (R) Components (C)

A generalized spatial population model for stock assessment, written in RTMB.

Authors:Matthew Cheng [aut, cre], Daniel Goethel [ctb], Pete Hulson [ctb], Curry Cunningham [ctb]

SPoRC_1.1.1.tar.gz
SPoRC_1.1.1.zip(r-4.7)SPoRC_1.1.1.zip(r-4.6)SPoRC_1.1.1.zip(r-4.5)
SPoRC_1.1.1.tgz(r-4.6-any)SPoRC_1.1.1.tgz(r-4.5-any)
SPoRC_1.1.1.tar.gz(r-4.7-any)SPoRC_1.1.1.tar.gz(r-4.6-any)
SPoRC_1.1.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
SPoRC/json (API)

# Install 'SPoRC' in R:
install.packages('SPoRC', repos = c('https://noaa-fisheries-integrated-toolbox.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/chengmatt/sporc/issues

Pkgdown/docs site:https://chengmatt.github.io

Datasets:

On CRAN:

Conda:

6.19 score 7 stars 59 exports 54 dependencies

Last updated from:abc329bcd0. Checks:7 WARNING, 2 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-x86_64WARNING1025
source / vignettesOK309
linux-release-x86_64WARNING1342
macos-release-arm64WARNING969
macos-oldrel-arm64WARNING894
windows-develWARNING1440
windows-releaseWARNING1334
windows-oldrelWARNING1369
wasm-releaseOK152

Exports:catch_to_F_multifleetcatch_to_F_singlefleetcondition_closed_loop_simulationsdo_francis_reweightingdo_jitterdo_likelihood_profileDo_Population_Projectiondo_retrospectivedo_runs_testfit_modelget_biological_plotget_catch_fits_plotget_closed_loop_reference_pointsget_comp_propget_data_fitted_plotget_idx_fitsget_idx_fits_plotget_key_quantsget_logistN_Sigmaget_model_rep_from_mcmcget_nLL_plotget_osaget_par_est_infoGet_Reference_Pointsget_retrospective_plotget_retrospective_relative_differenceget_selex_plotget_ts_plotmarg_AICplot_all_basicplot_residspost_optim_sanity_checksrho_transrun_annual_cyclerun_francisset_data_indicator_unusedSetup_Mod_BiologicalsSetup_Mod_Catch_and_FSetup_Mod_DimSetup_Mod_FishIdx_and_CompsSetup_Mod_Fishsel_and_QSetup_Mod_MovementSetup_Mod_RecSetup_Mod_SrvIdx_and_CompsSetup_Mod_Srvsel_and_QSetup_Mod_TaggingSetup_Mod_WeightingSetup_Sim_BiologicalsSetup_Sim_ContainersSetup_Sim_DimSetup_sim_envSetup_Sim_FishingSetup_Sim_RecSetup_Sim_SurveySetup_Sim_TaggingSimulate_Pop_Staticsimulation_data_to_SPoRCsimulation_self_testtheme_sablefish

Dependencies:abindclicodetoolscowplotcpp11data.tabledigestdplyrfarverfuturefuture.applygenericsggplot2globalsgluegridExtragtablehereisobandlabelinglatticelifecyclelistenvmagrittrMASSMatrixnleqslvparallellypillarpkgconfigplyrprogressrpurrrR6randtestsRColorBrewerRcppRcppEigenreshape2rlangrprojrootRTMBS7scalesstringistringrtibbletidyrtidyselectTMButf8vctrsviridisLitewithr

Description of Model and Data Dimensions

Rendered froma_model_dimensions.Rmdusingknitr::rmarkdownon Jun 04 2026.

Last update: 2026-03-31
Started: 2025-04-29

Description of Model Parameters

Rendered fromb_model_parameters.Rmdusingknitr::rmarkdownon Jun 04 2026.

Last update: 2026-03-31
Started: 2025-04-29

Description of Model Equations

Rendered fromc_model_equations.Rmdusingknitr::rmarkdownon Jun 04 2026.

Last update: 2026-03-31
Started: 2025-04-29

Description of Model Report

Rendered fromd_model_report.Rmdusingknitr::rmarkdownon Jun 04 2026.

Last update: 2026-03-31
Started: 2025-05-19

Setting up a Single Region Model (Alaska Sablefish)

Rendered frome_single_region_sablefish_case_study.Rmdusingknitr::rmarkdownon Jun 04 2026.

Last update: 2025-09-30
Started: 2025-04-29

Setting up a Single Region Model (Eastern Bering Sea Pollock)

Rendered fromf_single_region_ebs_pollock_case_study.Rmdusingknitr::rmarkdownon Jun 04 2026.

Last update: 2025-11-24
Started: 2025-07-08

Setting up a Spatial Model (Alaska Sablefish)

Rendered fromg_spatial_sablefish_case_study.Rmdusingknitr::rmarkdownon Jun 04 2026.

Last update: 2026-03-31
Started: 2025-04-29

Run Closed Loop Simulations

Rendered fromh_closed_loop_simulations.Rmdusingknitr::rmarkdownon Jun 04 2026.

Last update: 2026-03-31
Started: 2025-05-24

Deriving Reference Points, Catch Advice, and Projections

Rendered fromi_reference_points.Rmdusingknitr::rmarkdownon Jun 04 2026.

Last update: 2026-03-31
Started: 2025-06-18

Starting Values and Fixing (and Sharing) Parameters

Rendered fromj_starting_mapping.Rmdusingknitr::rmarkdownon Jun 04 2026.

Last update: 2026-03-31
Started: 2025-07-01

Defining Priors

Rendered fromk_defining_priors.Rmdusingknitr::rmarkdownon Jun 04 2026.

Last update: 2026-03-31
Started: 2025-07-16

Simulation Testing (Cross and Self Tests)

Rendered froml_simulation_testing.Rmdusingknitr::rmarkdownon Jun 04 2026.

Last update: 2025-10-15
Started: 2025-09-30

Description of Simulation Dimensions

Rendered fromm_simulation_dimensions.Rmdusingknitr::rmarkdownon Jun 04 2026.

Last update: 2025-10-23
Started: 2025-10-02

Random Effects (Selectivity Example; Eastern Bering Sea Pollock)

Rendered fromn_single_region_ebs_pollock_randomeff_case_study.Rmdusingknitr::rmarkdownon Jun 04 2026.

Last update: 2025-11-27
Started: 2025-10-03

Running a Simple Assessment (The Basics)

Rendered fromo_get_started.Rmdusingknitr::rmarkdownon Jun 04 2026.

Last update: 2026-06-02
Started: 2025-07-18

Testing Management Procedures via Closed Loop Simulations (Dusky Rockfish)

Rendered fromp_single_region_dusky_alt_mp_testing.Rmdusingknitr::rmarkdownon Jun 04 2026.

Last update: 2026-03-31
Started: 2025-10-13

Alternative Approaches for Movement Parameterization

Rendered fromq_movement_param.Rmdusingknitr::rmarkdownon Jun 04 2026.

Last update: 2026-05-28
Started: 2026-03-31

Readme and manuals

Help Manual

Help pageTopics
Solve for fishing mortality rates that achieve target catches for multiple fleetscatch_to_F_multifleet
Go from TAC to Fishing Mortality using bisection for when a single fishery fleet existscatch_to_F_singlefleet
Set up simulation list for closed-loop projectionscondition_closed_loop_simulations
Get Francis Weightsdo_francis_reweighting
Run Jitter Analysisdo_jitter
Run Likelihood Profiledo_likelihood_profile
Do Population ProjectionsDo_Population_Projection
Run retrospective analyses for RTMB modelsdo_retrospective
Runs test function taken from SS3 diags.do_runs_test
Dusky model outputs from single regino modeldusky_rtmb_model
Run RTMB modelfit_model
Get Plots of Biological Quantitiesget_biological_plot
Title Get Catch Fits Plotget_catch_fits_plot
Get Closed Loop Reference Pointsget_closed_loop_reference_points
Gets composition data proportions normalized according to the assessment specifications from RTMBget_comp_prop
Get Data Fitted to Plotget_data_fitted_plot
Gets index fits resultsget_idx_fits
Get Index Fits Plotget_idx_fits_plot
Generate Key Projection Quantities and Table Plotget_key_quants
Construct logistic-normal covariance matrixget_logistN_Sigma
Extract model report from MCMC posterior samplesget_model_rep_from_mcmc
Get plot of negative log likelihood valuesget_nLL_plot
Compute OSA residuals for composition dataget_osa
Helper function for extracting parameter information and names from TMBget_par_est_info
Wrapper function to get reference pointsGet_Reference_Points
Get Retrospective Plotget_retrospective_plot
Derive relative difference from terminal year from a retrospective analysis.get_retrospective_relative_difference
Get Fishery and Survey Selectivity Plotsget_selex_plot
Get Time Series Plotsget_ts_plot
Calculate the Corrected marginal AIC (AICc) from Optimization Resultsmarg_AIC
Sablefish data for multi region (5 area) case studymlt_rg_sable_data
Sablefish report for 5 region case studymlt_rg_sable_rep
Plotting function for all basic quantitiesplot_all_basic
Plots OSA residuals from outputs from get_osa. Much of this code is taken from the afscOM package, but with modificaitons to plot features.plot_resids
Post Optimization Model Convergence Checkspost_optim_sanity_checks
Title Constrains value between -1 and 1rho_trans
Run Annual Cycle in Simulation Environmentrun_annual_cycle
Run Iterative Francis Reweighting Procedurerun_francis
Set Data Indicators to Unused for Specified Yearsset_data_indicator_unused
Setup biological inputs for estimation modelSetup_Mod_Biologicals
Setup fishing mortality and catch observationsSetup_Mod_Catch_and_F
Set up model dimensionsSetup_Mod_Dim
Setup observed fishery indices and composition data (age and length comps)Setup_Mod_FishIdx_and_Comps
Setup fishery selectivity and catchability specificationsSetup_Mod_Fishsel_and_Q
Setup Movement Processes for SPoRCSetup_Mod_Movement
Setup model objects for specifying recruitment module and associated processesSetup_Mod_Rec
Setup observed survey indices and composition data (age and length comps)Setup_Mod_SrvIdx_and_Comps
Setup survey selectivity and catchability specificationsSetup_Mod_Srvsel_and_Q
Setup tagging processes and parametersSetup_Mod_Tagging
Set up SPoRC model weightingSetup_Mod_Weighting
Set up simulation containers and inputs for biological parametersSetup_Sim_Biologicals
Setup containers for simulation and outputSetup_Sim_Containers
Initialize Simulation Dimension SettingsSetup_Sim_Dim
Constructs simulation objects in a new simulation environment for use in simulation functionsSetup_sim_env
Setup values and dimensions of fishing processesSetup_Sim_Fishing
Set up recruitment dynamics for simulationSetup_Sim_Rec
Setup values for survey parameterizationSetup_Sim_Survey
Set up simulated tagging dynamicsSetup_Sim_Tagging
Dusky data for single region assessment case studysgl_rg_dusky_data
EBS Walleye Pollock data for single region case studysgl_rg_ebswp_data
Sablefish data for single region case studysgl_rg_sable_data
Sablefish report for single region case studysgl_rg_sable_rep
Simulates a static spatial, sex, and age-structured population (no feedback loop)Simulate_Pop_Static
Extract simulation data into SPoRC formatsimulation_data_to_SPoRC
Conduct a Simulation Self Testsimulation_self_test
ggplot theme for sablefishtheme_sablefish
Sablefish data for multi region (3 area) case studythree_rg_sable_data
Sablefish report for 3 region case studythree_rg_sable_rep