Perform a retrospective analysis, successive removals of most recent years of data to evaluate consistency in model estimates of biomass, recruitment, etc.
The summary
method returns Mohn's rho and the plot method generates a markdown report.
Usage
retrospective(MARSassess, yret = 1:5, cores = 1)
# S3 method for class 'MARSretro'
plot(x, var = c("S_yst", "R_yst", "F_yst", "VB_ymft"), s = 1, f = 1, ...)
# S3 method for class 'MARSretro'
summary(object, by = c("stock", "fleet"), ...)
# S3 method for class 'MARSretro'
report(
object,
filename = "retro",
dir = tempdir(),
open_file = TRUE,
render_args = list(),
...
)
Arguments
- MARSassess
MARSassess object
- yret
Vector of integers (greater than zero) specifying the years to remove for the retrospective analysis
- cores
Integer for the number of cores to use for parallel processing (snowfall package)
- x, object
Output of
retrospective
function- var
Character to indicate the metric, the item in the
MARSretro
list to be plotted. See details below.- s
Integer for the stock index to plot
- f
Integer for the fleet index to plot
- ...
Not used
- by
Character indicating whether to calculate to Mohn's rho on stock or fleet-based time series
- filename
Character string for the name of the markdown and HTML files.
- dir
The directory in which the markdown and HTML files will be saved.
- open_file
Logical, whether the HTML document is opened after it is rendered.
- render_args
List of arguments to pass to
rmarkdown::render()
.
Value
A MARSretro
object containing a named lists of arrays generated by the retrospective analysis:
S_yst
Spawning output array[y, s, t]
wheret
indexes the retrospective peelR_yst
Recruitment array[y, s, t]
F_yst
Apical fishing mortality[y, s, t]
VB_ymft
Vulnerable biomass available to each fishery[y, m, f, t]
plot.MARSretro
returns individual figures using base graphics.
summary.MARSretro
returns a matrix of Mohn's rho.
report.MARSretro
returns a HTML markdown report.