Function reference
Model overviews
The make_html() function generates a single html file out of gadgetutils::g3_fit() output that contains key model diagnostics. The gadget_plots() function saves a set of diagnostics plots into a folder.
-
make_html() - Save diagnostic graphs to a single html document
-
gadget_plots() - Wrapper for plot.gadget.fit that saves all diagnostic graphs to a directory
Plotting functions
The package produces plots in four categories:
plot_*()functions plot gadget model output generated usinggadgetutils::g3_fit(). These functions have a generic shorthand, theplot(), withparamargument specifying the type of plot.dplot_*()functions plot gadget model input data generated using mfdb,gadgetutils::g3_data()orgadgetutils::add_g3_attributes()functions.the
g3d_plot()function plots data directly from a gadget model object.g3plot_*functions plot gadget suitability (selectivity) functions.
The plot_* for g3_fit output
These functions make the plots typically used in asssessment and model diagnostics. Some of the functions have return_data argument, which can be used to quickly grab associated data for further analyses, custom plots and tables.
-
plot(<gadget.fit>) - Plot
gadget.fitobject
-
plot_annual() - Plot annual ICES type of graphic returning central model data
-
plot_adist() - Plot model age distributions for stocks by year
-
plot_ageclass() - Plot an age class from the model
-
plot_agecomp() - Plot of age composition from the model
-
plot_agelength() - Plot of fitted growth for each age-length component
-
plot_growth() - Plot of average growth for each stock
-
plot_biomass() - Plot stock biomasses
-
plot_ssb() - Plot spawning stock biomass
-
plot_rec() - Plot recruitment
-
plot_sr() - Plot stock-recruitment relationship
-
plot_si() - Plot survey indices
-
plot_catch() - Plot catches
-
plot_f() - Plot fishing mortality
-
plot_hr() - Plot harvest rate
-
plot_suitability() - Plot suitability
-
plot_catchdist() - Plot catch distributions
-
plot_ldist() - Plot model length distributions for stocks by year
-
plot_stockcomp() - Plot model stock composition
-
plot_stockdist() - Plot stock distribution
-
plot_likelihood() - Plot likelihood summary
-
plot_param() - Plot parameter values relative to their boundaries
-
plot_resid() - Plot residuals for catch distributions
-
plot_weight() - Plot parameter weights
Model diagnostics
These functions require a list of gadget.fit objects generated using the gadgetutils::g3_jitter(), gadgetutils::g3_leaveout(), and gadgetutils::g3_retro() functions.
-
plot_jitter() - Plot central model output from a jitter analysis
-
plot_leaveout() - Plot central model output from a leave-out analysis
-
plot_retro() - Plot model biomass from a retrospective analysis
The dplot_* for gadget input data
These functions plot gadget input data attempting to highlight attributes, which guide the model fitting, but are often difficult to notice otherwise.
-
dplot_adist() - Plot age distribution data for a gadget3 model
-
dplot_aldist() - Plot age-length distribution data for a gadget3 model
-
dplot_ldist() - Plot length distribution data for a gadget3 model
-
dplot_sexr() - Plot sex ratio data for a gadget3 model
-
dplot_stockdist() - Plot stock distribution data for a gadget3 model
-
dplot_catch() - Plot catch data for a gadget3 model
The g3d_plot for gadget model objects
The g3d_plot() function plots all observational data passed into a TMB or R gadget model.
-
g3d_plot() - Plot of data passed into a gadget model
The g3plot_* for suitability functions
These plot gadget suitability functions, which can be difficult to comprehend without visualizing. The model parameters can be extracted from a gadget.fit object or typed in manually.
-
g3plot_andersen() - Plot Andersen suitability using model parameters
-
g3plot_exponentiall50() - Plot exponentiall50 suitability using model parameters
-
fit - An example gadget.fit object.
-
aldist_example - Age-length input data to gadget
-
ldist_example - Length input data to gadget
-
sexratio_example - Sex input data to gadget
-
stockdist_example - Maturity input data to gadget
-
TrawlNor_catchesInternat_catchesOtherNor_catchesInternat_catchesOtherRus_catchesTrawlRus_catchesTrawlNor_catches - Catch input data to gadget