Skip to contents

Plots the true retrospective of an assessment model during the closed-loop simulation. A series of time series estimates of SSB, F, and VB are plotted over the course of the MSE are plotted against the operating model (true) values (in black).


retrospective_AM(MSE, MP, sim = 1, plot_legend = FALSE)



An object of class MSE.


Character. The name of the management procedure created by make_MP() containing the assessment model.


Integer between 1 and MSE@nsim. The simulation number for which the retrospectives will be plotted.


Logical. Whether to plot legend to reference year of assessment in the MSE.


A series of figures for SSB, depletion, fishing mortality, and vulnerable biomass (VB) estimated in the MP over the course of the closed-loop simulation against the values generated in the operating model (both historical and projected).


For assessment models that utilize annual exploitation rates (u), the instantaneous fishing mortality rates are obtained as F = -log(1 - u).


This function only plots retrospectives from a single simulation in the MSE. Results from one figure may not be indicative of general assessment behavior and performance overall.

See also


Q. Huynh


# \donttest{
SP_40_10 <- make_MP(SP, HCR_MSY, diagnostic = "full")
OM <- MSEtool::testOM; OM@proyears <- 20
myMSE <- MSEtool::runMSE(OM = OM, MPs = "SP_40_10")
#>  Checking MPs
#> Error: Some MPs are not a functions of class `MP`: SP_40_10
retrospective_AM(myMSE, MP = "SP_40_10", sim = 1)
#> Error in eval(expr, envir, enclos): object 'myMSE' not found

# How to get all the estimates
assess_estimates <- lapply(1:myMSE@nMPs, function(m) {
  lapply(1:myMSE@nsim, function(x) {
    myMSE@PPD[[m]]@Misc[[x]]$Assessment_report %>% 
      mutate(MP = myMSE@MPs[m], Simulation = x)
  }) %>% bind_rows()
}) %>% bind_rows()
#> Error in eval(expr, envir, enclos): object 'myMSE' not found
# }