Skip to content

use of warnOnly argument in gsl_nls() #8

@JorisChau

Description

@JorisChau

There are several calls to gsl_nls() that make use of the argument warnOnly, which is a valid argument of nls.control(), but not of gsl_nls_control(), e.g. in FourPHFfit.R:

gsl_nls(
          csgp ~ FourPHF_fixy0(x = intervals, a, bta, c),
          data = data,
          algorithm = algorithm,
          start = list(a = starta, bta = startbta, c = startc),
          control = list(maxiter = maxiter, warnOnly = warnOnly,
                         scale = "levenberg"))

Reverse dependency checks of a new version of gslnls initially failed because of this use of warnOnly. I have currently updated gsl_nls_control() to allow for spurious arguments, such as warnOnly, but this is not used anywhere downstream by gsl_nls().

Note: gsl_nls() now always returns a warning in case the gradient at the parameter estimates is singular (where the error thrown by minpack.lm::nlsLM() or nls() can be turned into a warning with warnOnly). In all other cases where gsl_nls() fails to converge, (e.g. because the max. number of iterations was exceeded), this will show up in the convInfo element of the model fit.

KR,
Joris

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions