accept_port_fit: Accept or reject a non-converged port fit

View source: R/aanalyse_kinetics_helpers.R

accept_port_fitR Documentation

Accept or reject a non-converged port fit

Description

stats::nls() with algorithm = "port" and warnOnly = TRUE returns a model whose stop certificate failed. It is kept with a warning when ok holds and its coefficients are finite; otherwise it is reported as an error and dropped. The port stop code is reported in prose either way.

Usage

accept_port_fit(model, on_error, ok = TRUE)

Arguments

model

An nls model or NULL.

on_error

A reporting function; see fit_td_fallback().

ok

Logical; a further acceptance condition, e.g. an RSS no worse than the starting estimates. Evaluated only for a non-converged fit.

Value

model or NULL.


mnirs documentation built on Sept. 13, 2026, 1:06 a.m.