check_convergence: Check convergence of WHAM model

View source: R/check_convergence.R

check_convergenceR Documentation

Check convergence of WHAM model

Description

Access quick convergence checks from 'TMB' and 'nlminb'.

Usage

check_convergence(mod, ret = FALSE, f = "")

Arguments

mod

output from fit_wham

ret

T/F, return list? Default = FALSE, just prints to console

Value

a list with at least the first three of these components:

$convergence

From stats::nlminb, "0 indicates successful convergence for nlminb"

$maxgr

Max absolute gradient value, from 'max(abs(mod$gr(mod$opt$par)))'

$maxgr_par

Name of parameter with max gradient

$is_sdrep

If TMB::sdreport was performed for this model, this indicates whether it performed without error

$na_sdrep

If TMB::sdreport was performed without error for this model, this indicates which (if any) components of the diagonal of the inverted hessian were returned as NA

See Also

fit_wham, fit_tmb, stats::nlminb

Examples

## Not run: 
data("input4_SNEMAYT") # load SNEMA yellowtail flounder data and parameter settings
mod = fit_wham(input4_SNEMAYT) # using default values
check_convergence(mod)

## End(Not run)

timjmiller/wham documentation built on July 13, 2024, 10:10 p.m.