Skip to contents

Plot functions

Functions for visualising model inputs, outputs, and diagnostics.

plot_mcmc_diagnostics()
MCMC diagnostics plot
plot_likelihood_components()
Likelihood components plot
pairs_rtmb()
Pairs plot
plot_Fs()
Plot fishing mortality
plot_Us()
Plot exploitation rate
plot_compare_U()
Plot exploitation rate (ability to compare)
plot_catch()
Plot fishing catch
plot_cpue()
Plot CPUE fits
plot_sexr()
Plot sex ratio fits
plot_compare_sexr()
Compare sex ratios
plot_lfs()
Plot LF fits
plot_compare_lfs()
Plot LF fit comparison
plot_vb()
Compare adjusted vulnerable biomass
plot_ssb()
Compare spawning biomass
plot_compare_cpue()
Compare CPUE fits
plot_rec()
Compare recruitment trajectories
plot_sel()
Plot selectivity at length
plot_M()
Plot natural mortality at length
plot_mat()
Compare maturity
plot_ninit()
Compare initial numbers
plot_posteriors()
Plot posteriors and priors
plot_growth_increment()
Plot growth increments
plot_growth_increment2()
Plot growth increments compare multiple models
plot_growth_density()
Plot growth density
plot_loo()
Plot PSIS LOO diagnostics
plot_profile()
Plot a likelihood profile
plot_priors()
Plot priors
plot_mps()
Plot candidate MPs
plot_tag_residuals()
Plot tag residuals
plot_lf_residuals()
Plot length frequency (LF) residuals
plot_sexr_residuals()
Plot sex ratio residuals
plot_cpue_residuals()
Plot CPUE residuals
plot_catch_residuals()
Plot fishing catch
plot_recruitment()
Plot recruitment time series
plot_retro_biomass()
Plot a retrospective analysis

Model and utility functions

Core model functions and utilities for data preparation and post-processing.

check_bounds_opt()
Check optimized parameters against their bounds
check_data()
Check the data
check_priors()
Check prior specifications against the parameters they apply to
cmb()
Bind data to an objective function
decamod()
Integrated rock lobster stock assessment model
decamod_globals()
Build MCMC globals for decamod models
do_dynamics()
Run the dynamics
diagnose_exploitation()
Diagnose catch-conditioned exploitation without changing population dynamics
do_mpe()
Run management procedure evaluation
do_mpe_old()
Run legacy management procedure evaluation
do_projection()
Do projection
double_normal_ogive()
Double normal curve
dmultinom_fractional()
Fractional multinomial log pseudo-likelihood
drobust()
Robust normal likelihood
dstudent_t_sd()
Student-t density parameterized by standard deviation
evaluate_priors()
Evaluate priors
extend_years()
Extend year-varying value into projection years
get_F()
Estimate fishing mortality
get_M()
Extract natural mortality at length
get_MSY()
Calculate MSY
get_MSY2()
Calculate MSY
get_M_length()
Natural mortality at length
get_RAM()
RAM legacy output
get_U()
Calculate exploitation rate
get_bounds()
Obtain default parameter bounds
get_cpue()
Extract CPUE observations and predictions
get_cpue_likelihood()
Get CPUE likelihood
get_derived_quants()
Get derived quantities
get_equilibrium_numbers()
Obtain the equilibrium numbers at length
get_equilibrium_numbers_lsd()
Obtain the equilibrium numbers at length: LSD approach
get_growth_generator()
Obtain a continuous-time growth generator
get_growth_increment()
Obtain growth increments
get_growth_increment_fixed()
Attach length-diffusion uncertainty to fixed expected growth increments
get_growth_increment_linf()
Obtain generalized Linf/K growth increments
get_growth_increment_ode()
Evaluate the monotone-ODE mean growth curve
get_growth_increment_vb()
Obtain von Bertalanffy growth increments
get_growth_matrix()
Obtain a growth transition matrix
get_growth_matrix_ctmc()
Obtain a time-consistent continuous-time growth matrix
get_growth_shape_contrast_linf()
Expected small-size growth contrast under generalized Linf/K growth
get_growth_tag_likelihood_ctmc()
Evaluate tag observations under a continuous-time latent growth process
get_lf_Francis()
Francis weights
get_loo()
Obtain the leave-one-out information criterion (LOO IC)
get_mcmc_profile()
Get posterior samples for a likelihood profile
get_ninit()
Get initial numbers
get_posterior()
Obtain samples from the posterior distribution of reported quantities
get_priors()
Obtain default priors
get_rec()
Get recruitment
get_reference_region()
Calculate reference levels separately in each region
get_recruitment_size()
Obtain the size at recruitment
get_rho()
Estimate Temporal Autocorrelation in Recruitment Deviations
get_sel()
Get selectivity
get_sexr()
Get sex ratios
get_ssb()
Get spawning stock biomass
get_stock_recruitment()
Obtain stock-recruitment relationship
get_vb()
Get AW adjusted vulnerable biomass
get_weight()
Get weight array by year, season, region, sex, and length
growth_francis_to_linf()
Convert Francis reference increments to generalized Linf/K parameters
growth_linf_to_francis()
Convert generalized Linf/K parameters to Francis reference increments
growth_model()
Standalone tag-growth model
growth_reference_to_linf()
Convert constrained reference-increment coordinates to Linf/K
ht()
Head and tail
inv_lb_ub()
Lower and upper bounds inverse transform
inv_simplex()
Inverse simplex
jac_exp()
Jacobian for exponential transform
jac_invlogit()
Jacobian for inverse logit transform
jac_log()
Jacobian for log transform
jac_logit()
Jacobian for logit transform
lb_ub()
Lower and upper bounds transform
length_to_weight()
Convert length to weight
logistic_capped_ogive()
Capped logistic curve
logistic_ogive()
Logistic curve
mar()
Median of the absolute residual (MAR)
midcut()
Midcut
number_pars()
Number parameters in data frame with column par
posfun()
Positive continuation with a feasibility penalty
post_to_array()
List of posterior outputs to array to input into model
post_to_plot()
List of posterior outputs to data frame for plotting
prepare_growth_transition_data()
Prepare tag records for continuous-time growth transitions
prepare_mpe()
Prepare data and parameters for MPE
prepare_mpe_rm()
Remove years for MPE
prepare_proj()
Prepare data and values lists for projections
process_metric()
Summarise projection performance metrics
project_recruitment()
Project recruitment deviates
redo_obj()
Recreate a fitted model object
residuals_pit_beta()
Calculate Probability Integral Transform (PIT) residuals
residuals_pit_lnorm()
Calculate Probability Integral Transform (PIT) residuals
residuals_pit_norm()
Calculate Probability Integral Transform (PIT) residuals
rule_tacc()
Apply TACC decision rules
run_retrospective()
Do a retrospective analysis
sdnr()
Standard deviation of the normalised residual (SDNR)
simplex()
Simplex
spm_model()
Surplus production model
tmbprofile2()
Adaptive likelihood profiling

Management procedures and MSE

Define estimation models and harvest control rules, evaluate complete procedures, and inspect paired results.

mse_target()
Declare the biological timing of a relative-biomass target
mse_observations()
Construct the observation packet available to a management procedure
em_spm() em_gp() em_function()
Define an estimation model
fit_em_gp()
Fit a frozen observation-to-status Gaussian process
predict_em_gp()
Batch prediction from a frozen observation-to-status GP
hcr_lobster()
Define the rock-lobster harvest control rule
hcr_function()
Define a custom harvest control rule
mp()
Combine an estimation model and harvest control rule
mp_grid()
Cross estimation models and harvest control rules
print(<decamod_mp>) print(<decamod_em>) print(<decamod_mse>)
Print MSE specifications and results
run_mp() run_em()
Operate one annual management-procedure update
mse_om()
Define an operating-model adapter
om_decamod()
Use decamod as the operating model for compositional MSE
mse_robustness()
Specify prospective operating-model robustness perturbations
mse_outputs()
Configure additional closed-loop MSE outputs
run_mse()
Run compositional management strategy evaluation
validate_mse()
Validate a completed multi-procedure MSE
summarise_mse()
Summarise management and estimation performance for every EM-HCR combination
summarise_mse_diagnostics()
Summarise OM removal diagnostics without dropping affected trajectories
summarise_mse_indicators()
Summarise expanded MSE performance indicators
compare_mse()
Paired management contrasts with within-chain block resampling
mse_plateau_design()
Construct a plateau-height search using exactly one estimation model
run_plateau_search()
Run a single-EM, paired plateau-height search
summarise_plateau_search()
Summarise a plateau search without assuming a monotonic response

Label helper functions

Helpers for resolving model dimension labels.

default_labels()
Create fallback labels
data_labels()
Resolve labels from model data
year_labels()
Resolve model year labels
season_labels()
Resolve season labels
region_labels()
Resolve region labels
sex_labels()
Resolve sex labels
fishery_labels()
Resolve fishery labels
length_labels()
Resolve length-bin labels
cpue_labels()
Resolve CPUE index labels
model_labels()
Build model output dimension labels

Datasets

Example data objects included in the package.

RAM_template
RAM legacy template
berry_CRA2
Berry observations for CRA 2
catch_CRA2
Catch observations for CRA 2
celr_CRA2
CELR survey observations for CRA 2
fsu_CRA2
FSU survey observations for CRA 2
lf_CRA2
Length frequency observations for CRA 2
logbook_CRA2
Logbook CPUE observations for CRA 2
mature_CRA2
Maturity observations for CRA 2
sexr_CRA2
Sex ratio observations for CRA 2
tags_CRA2
Tag recapture observations for CRA 2
tags_all
Tag recapture observations