Learn R Programming

nonprobsampling (version 0.1.0)

check_nleqslv_result: Check the result returned by nleqslv

Description

Inspects the termination code (`termcd`) from `nleqslv::nleqslv()` and either returns silently on success, issues a warning for partial convergence, or stops with an informative error message on failure.

Usage

check_nleqslv_result(root, label, ftol)

Value

`invisible(TRUE)` on success or acceptable convergence; otherwise stops or warns.

Arguments

root

The list returned by `nleqslv::nleqslv()`.

label

Character string used as a prefix in messages to identify the calling method.

ftol

The function-value convergence tolerance, used to assess whether partial convergence is acceptable.