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(MSAassess, yret = 0:5, cores = 1)
# S3 method for class 'MSAretro'
plot(
x,
var = c("S_yst", "R_yst", "F_yst", "log_rdev_yst", "VB_ymft"),
s = 1,
f = 1,
...
)
# S3 method for class 'MSAretro'
summary(object, by = c("stock", "fleet"), ...)
# S3 method for class 'MSAretro'
report(
object,
filename = "retro",
dir = tempdir(),
open_file = TRUE,
render_args = list(),
...
)Arguments
- MSAassess
MSAassess object
- yret
Vector specifying the years (positive integers and include zero) to remove for the retrospective analysis
- cores
Integer for the number of cores to use for parallel processing (snowfall package)
- x, object
Output of
retrospectivefunction- var
Character to indicate the metric, the item in the
MSAretrolist 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 MSAretro object containing a named lists of arrays generated by the retrospective analysis:
S_ystSpawning output array[y, s, t]wheretindexes the retrospective peelR_ystRecruitment array[y, s, t]F_ystApical fishing mortality[y, s, t]VB_ymftVulnerable biomass available to each fishery[y, m, f, t]
plot.MSAretro returns individual figures using base graphics.
summary.MSAretro returns a matrix of Mohn's rho.
report.MSAretro invisibly returns the output of rmarkdown::render(): character of the path of the rendered HTML markdown report.