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_data()
Check the data
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
do_mpe()
Run management procedure evaluation
do_mpe_old()
Run legacy management procedure evaluation
do_projection()
Do projection
double_normal_ogive()
Double normal curve
drobust()
Robust normal likelihood
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_increment()
Obtain growth increments
get_growth_increment_vb()
Obtain von Bertalanffy growth increments
get_growth_matrix()
Obtain a growth transition matrix
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_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_model()
Standalone tag-growth model
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()
Ensure population above 0
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_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

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