is_converged() is a compact programmatic flag for workflows that need a
yes/no answer before comparing, displaying, or post-processing a drmTMB
fit. By default it checks only stored optimizer status: the nlminb()
convergence code must be 0 and the stored objective and log-likelihood must
be finite.
Usage
is_converged(object, ...)
# Default S3 method
is_converged(object, ...)
# S3 method for class 'drmTMB'
is_converged(object, include_hessian = FALSE, ...)Arguments
- object
A
drmTMBfit.- ...
Reserved for future convergence options.
- include_hessian
Logical; require a positive-definite
TMB::sdreport()Hessian in addition to optimizer convergence.
Details
Set include_hessian = TRUE when the next step needs Wald-style
uncertainty. In that mode, is_converged() also requires successful
TMB::sdreport() output with pdHess = TRUE. A fit can therefore be
optimizer-converged while still returning FALSE with
include_hessian = TRUE; this marks an inference-readiness problem, not
automatic proof that point estimates are unusable.
Use check_drm() when you need the full diagnostic table and messages.