terminate_opt: Test whether optimization should be stopped

View source: R/fit_spatq.R

terminate_optR Documentation

Test whether optimization should be stopped

Description

Sequentially tests whether maximum number of optimizations has been reached, if the maximum gradient component is less than optcontrol$grtol, relative parameter value changes between optimizations is less than optcontrol$dparrtol, or relative change in the objective function value is less than optcontrol$dobjrtol.

Usage

terminate_opt(fit = NULL, optcontrol)

Arguments

fit

spatq_fit object from attach_optdiags

optcontrol

spatq_optcontrol object

Value

boolean indicating termination (TRUE) or not (FALSE)

Author(s)

John K Best


jkbest2/spatq documentation built on Sept. 22, 2022, 3:22 a.m.