MASE for one-step ahead hindcasting cross-validations and computes MASE from prediction residuals of indices. MASE is calculated the average ratio of mean absolute error (MAE) of prediction residuals (MAE.PR) and Naive Predictions (MAE.base) MASE.adj sets the MAE.base to a minimum MAE.base.adj (default=0.1) MASE.adj allow passing (MASE<1) if MAE.PE < 0.1 and thus accurate, when obs show extremely little variation
Usage
SSmase(
retroSummary,
quants = c("cpue", "len", "age", "con"),
Season = "default",
models = "all",
endyrvec = "default",
indexselect = NULL,
MAE.base.adj = 0.1,
residuals = FALSE,
verbose = FALSE,
indexfleets = 1
)
Arguments
- retroSummary
raw list of retrospective runs created by
r4ss::SSgetoutput()
. Depending on the type of data, the function will call r4ss::SSsummarize or ss3diags:SSretroComps to summarize the list.- quants
data type, either "cpue" for index data, "len" for length composition data, or "age" for age composition data. Note, if using "age" or "len", SSretroComps() will be used to extract and summarize the composition data first.
- Season
option to specify Season as an integer of value 1-4 - Default uses first available, i.e. usual Seas = 1
- models
Optional subset of the models described in r4ss function summaryoutput(). Either "all" or a vector of numbers indicating columns in summary tables.
- endyrvec
Optional single year or vector of years representing the final year of values to show for each model. By default it is set to the ending year specified in each model.
- indexselect
Vector of fleet numbers for each model for which to compare
- MAE.base.adj
minimum MASE demoninator (naive predictions) for MASE.adj (default = 0.1)
- residuals
If true, includes a dataframe in the output of the prediction residuals and naive prediction residuals. Default is FALSE.
- verbose
Report progress to R GUI?
- indexfleets
Single value or vector of length n = number of models in summary object of the fleet number(s) for the index to compare.
Examples
if (FALSE) {
# calculate MASE for CPUE indices only for fleets 1 and 2
SSmase(retro.sma, quant = "cpue", indexselect = c(1:2))
}