Skip to contents

Model overview and example data

tinyAM-model
The tinyAM population and observation model
cod_obs
Northern cod assessment example data
sim_cod_obs sim_cod_truth
Simulated cod fisheries and surveys

Prepare inputs

make_tam_data()
Construct tinyAM input data from tables
as_tam_data() print(<tam_data>)
Organize tinyAM input data
check_tam_data()
Check tinyAM input data
cut_int() cut_ages() cut_years()
Cut integer sequences into labeled blocks (ages or years)
prepare_tam()
Build a self-contained data list for TAM
make_par()
Initialize parameter list for TAM

Specify model formulas

bh() ricker()
Recruitment formulas and stock-recruit relationships
logistic() mono()
Rising catchability and mean fishing-mortality curves
double_logistic()
Double-logistic selectivity curves
for_fleet() for_survey()
Apply a formula within one fleet or survey
smooth_formulas
Penalized smooth F and catchability relationships
power()
Abundance-dependent catchability
iid() rw() ar1()
Random effects in model formulas

Fit, diagnose and forecast

fit_tam()
Fit a Tiny Assessment Model (TAM)
update(<tam_fit>)
Update a fitted TAM model
check_tam() print(<tam_check>) print(<tam_checks>)
Check numerical convergence and model diagnostics
logLik(<tam_fit>) AIC(<tam_fit>) cAIC()
Compare fitted models using information criteria
print(<tam_fit>) summary(<tam_fit>) print(<summary_tam_fit>)
Print and summarize a TAM fit
fit_retro() fit_hindcast() print(<tam_retro>)
Retrospective fits and observation hindcasts
compute_hindcast_rmse()
Compute hindcast RMSE (observed vs projected)
compute_hindcast_mase()
Persistence-relative hindcast forecast error
compute_mohns_rho()
Compute Mohn's rho for retrospective analyses
sim_tam()
Simulate from a fitted TAM

Visualize and compare

vis_tam()
Make a flexdashboard for visualizing model fits
plot_model()
View the structure of fitted assessment models
plot_heatmap() plot_par() plot_bubbles() plot_resid() plot_trend() plot_obs_pred() add_plot_buttons()
Plot utilities for tidy_tam() outputs
plot_age_year()
Switch between annual trends and age profiles
plot_matrix()
Explore age-year patterns
plot_process_deviations() plot_process_residuals()
Explore fitted process deviations and joint-sample residuals
tam_cols() tam_pal()
TAM color palette helpers

Tidy model results

tidy_tam()
Stack TAM outputs across models (retro folds, scenarios, etc.)
tidy_obs_pred()
Tidy observed, predicted, and residual diagnostics
residuals(<tam_fit>)
Extract observation residuals
add_osa_residuals()
Calculate and retain one-step-ahead residuals
tidy_pop()
Collect population trends and age-specific estimates
get_ssb() get_recruitment() get_fbar() get_mbar() get_f() get_m()
Extract common population estimates
tidy_par()
Tidy parameter estimates (fixed & random) with CIs and back-transforms
tidy_recruitment()
Tidy recruitment relationships and residuals
tidy_sdrep()
Population time series with confidence intervals
tidy_rep()
Tidy reported trends
tidy_array()
Tidy a (named) matrix/array into long format
stack_list()
Stack a list of tables with an identifier column
stack_nested()
Stack identically named subtables from a nested list
trans_est()
Transform and rescale estimate columns

Process mathematics

nll_fun()
Evaluate or simulate the tinyAM model
dprocess_rw() rprocess_rw()
Temporal random-walk process: density and simulation
dprocess_ar1() rprocess_ar1()
Separable AR1 process error: density and simulation
dprocess_cor_rw() rprocess_cor_rw()
Random walk with age-correlated increments: density and simulation