Skip to contents

Takes list of REMA models from from fit_rema, and returns a list of ggplot2 objects to be plotted or saved, a list of tidy_rema data.frames, and AIC values.

Usage

compare_rema_models(
  rema_models,
  admb_re = NULL,
  save = FALSE,
  filetype = "png",
  path = NULL,
  xlab = NULL,
  biomass_ylab = "Biomass",
  cpue_ylab = "CPUE"
)

Arguments

rema_models

list of REMA models to be compared. Each REMA model in the list should be a list object output from fit_rema

admb_re

list of ADMB RE model input/output from read_admb_re. Accepts a single list, not list of multiple ADMB RE models. If admb_re is provided, no AIC calculations will be conducted.

save

(optional) logical (T/F) save figures as filetype in path. Default = FALSE. NOT YET IMPLEMENTED.

filetype

(optional) character string; type of figure file. Default = 'png'. NOT YET IMPLEMENTED.

path

(optional) directory path to location where figure files are to be saved if save = TRUE. NOT YET IMPLEMENTED.

xlab

(optional) label for x-axis of biomass and CPUE plots (e.g. 'Year'). Default = NULL.

biomass_ylab

(optional) label for y-axis of biomass plots (e.g. 'Biomass (t)'). Default = 'Biomass'.

cpue_ylab

(optional) label for y-axis of CPUE plots (e.g. 'Relative Population Number'). Default = 'CPUE'.

Value

a list with the following items:

$output

A list of tidied dataframes that include parameter estimates, biomass and optional CPUE data, and REMA model predictions for each model to be compared. Results for a given variable are only included if they are applicable to all comparison models. For example, if CPUE is fit in one model but not another, compare$output$cpue_by_strata) will return an informational message instead of a dataframe. See tidy_rema for more information.

$plots

ggplot2 figure objects of compare$output data.

$aic

A dataframe of Akaike Information Criteria (AIC) values. Only output if the underlying models are fit to the same data.

See also

Examples

if (FALSE) { # \dontrun{
# placeholder for example
} # }