diagnostic_AM: diagnostic_AM (diagnostic of Assessments in MSE): Did Assess...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/diagnostic_AM.R

Description

Diagnostic check for convergence of Assess models during MSE. Assess models write output to the DLMenv environment if the MP was created with make_MP with argument diagnostic = TRUE. This function summarizes and plots the diagnostic information.

Usage

1
diagnostic_AM(MSE, MP = NULL, gradient_threshold = 0.1, figure = TRUE)

Arguments

MSE

An object of class MSE created by runMSE. If no MSE object is available, use argument MP instead.

MP

A character vector of MPs with assessment models.

gradient_threshold

The maximum magnitude (absolute value) desired for the gradient of the likelihood.

figure

Logical, whether a figure will be drawn.

Value

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 nlminb), and the maximum gradient of the likelihood in each assessment run. Also includes the number of optimization iterations function evaluations reported by nlminb for each application of the assessment model.

Author(s)

Q. Huynh

See Also

retrospective_AM

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
DD_MSY <- make_MP(DD_TMB, HCR_MSY, diagnostic = "min")
show(DD_MSY)

##### Ensure that PPD = TRUE in runMSE function
myMSE <- runMSE(DLMtool::testOM, MPs = "DD_MSY", PPD = TRUE)
diagnostic_AM(myMSE)

## End(Not run)

tcarruth/MSEtool documentation built on Oct. 19, 2020, 6:09 a.m.