Skip to contents

Data

S4 objects for data setup.

MARSdata-class
MARSdata S4 object

Model setup

Prepare the data and parameters, then run the model.

check_data()
Check dimensions and inputs in MARSdata object
make_parameters() make_map() check_parameters()
Make list of parameters for RTMB
prior_h() prior_M() prior_q()
Priors for MARS model
fit_MARS()
Fit MARS model
MARSassess-class
MARSassess S4 object

Model evaluation

Evaluate model fit and run diagnostics.

profile(<MARSassess>) plot(<MARSprof>)
Profile parameters of MARS model
report()
Generate markdown reports
residuals(<MARSassess>)
Calculate model residuals
retrospective() plot(<MARSretro>) summary(<MARSretro>) report(<MARSretro>)
Retrospective analysis
simulate(<MARSassess>)
Simulate data

Population dynamics

Functions used in the population model.

calc_F()
Newton-Raphson search for fishing mortality
calc_POP() calc_HSP()
Predict the probability of CKMR kinship pairs
calc_index()
Calculate index at age
calc_nextN()
Project stock abundance to the next time step
calc_phi_project()
Equilibrium spawners per recruit by projection
calc_phi_simple() calc_NPR()
Simple spawners per recruit calculation
calc_population()
Multi-fleet, multi-area, multi-stock population dynamics model
calc_recruitment()
Calculate recruitment from stock-recruit function
conv_mov()
Calculate movement matrix for all age classes
conv_selpar() calc_sel_len() calc_fsel_age() calc_isel_age()
Selectivity at age and length
calc_eqdist()
Equilibrium distribution from movement matrix

Likelihood and prior functions

Calculate the log-likelihood or log-prior density functions from data and estimated parameters.

like_comp()
Likelihood for composition vectors
like_CKMR()
Likelihood for CKMR

Miscellaneous

Other useful functions.

calc_LAK()
Length-at-age key
calc_growth()
Calculate von Bertalanffy length-at-age
CondExpLt() CondExpLe() CondExpGt() CondExpGe() CondExpEq()
If statements compatible with RTMB
conv_Sigma()
Calculate covariance matrix
get_MARSdata()
Retrieve data object used to fit model
get_sdreport()
Calculate standard errors
optimize_RTMB()
Optimize RTMB model
posfun()
Quadratic penalty function
softmax()
Softmax function