diagnostic | R Documentation |
Diagnostic check for convergence of Assess models during closed-loop simulation. Use when the MP was
created with make_MP with argument diagnostic = "min"
or "full"
.
This function summarizes and plots the diagnostic information.
diagnostic(MSE, MP, gradient_threshold = 0.1, figure = TRUE)
diagnostic_AM(...)
MSE |
An object of class MSE created by |
MP |
Optional, a character vector of MPs that use assessment models. |
gradient_threshold |
The maximum magnitude (absolute value) desired for the gradient of the likelihood. |
figure |
Logical, whether a figure will be drawn. |
... |
Arguments to pass to |
A matrix with diagnostic performance of assessment models in the MSE. If figure = TRUE
,
a set of figures: traffic light (red/green) plots indicating whether the model converged (defined if a positive-definite
Hessian matrix was obtained), the optimizer reached pre-specified iteration limits (as passed to stats::nlminb()
),
and the maximum gradient of the likelihood in each assessment run. Also includes the number of optimization iterations
function evaluations reported by stats::nlminb()
for each application of the assessment model.
Q. Huynh
retrospective_AM
OM <- MSEtool::testOM; OM@proyears <- 20
myMSE <- runMSE(OM, MPs = "SCA_4010")
diagnostic(myMSE)
# How to get all the reporting
library(dplyr)
conv_statistics <- lapply(1:myMSE@nMPs, function(m) {
lapply(1:myMSE@nsim, function(x) {
myMSE@PPD[[m]]@Misc[[x]]$diagnostic %>%
mutate(MP = myMSE@MPs[m], Simulation = x)
}) %>% bind_rows()
}) %>% bind_rows()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.