Documentation

20.36 Retryable versus non-retryable failures

Before using --retry, classify what failed. A new starting point can change an optimizer trajectory, but it cannot create a missing file, make invalid syntax valid, implement an unsupported feature, or correct contradictory data. nlmx therefore retries estimation outcomes for which alternative starts may be useful and returns deterministic setup errors immediately.

Retryable and non-retryable outcomes
Outcome Retried? Reason
Numerical estimation error Yes The likelihood may be evaluable from another start.
Iteration limit reached Yes The attempt has results but did not meet a convergence rule.
Line search failed Yes A different initial location may produce a better search path.
Nonconverged optimizer termination Yes Starting-point sensitivity is plausible.
Missing control stream or dataset No No starting value can supply the file.
Invalid option or configuration No The command must be corrected.
Control stream cannot be parsed No The model definition must be corrected.
Unsupported model feature No A different start does not add implementation support.
Invalid dataset or event structure No The data problem remains identical for every attempt.

“Retried” does not mean “expected to succeed.” A covariance failure after a converged minimization is evidence about curvature or identifiability, not automatically a failed estimation that should be solved by cycling starts. Conversely, a run that reaches the iteration limit is nonconverged even when its OFV is close to a known solution and its covariance step happens to complete.

Read the stage and exit class in the transcript. Retryable numerical errors use nlmx’s numerical-failure class. Usage, I/O, configuration, unsupported-feature, artifact, and data failures are not retried. This protects an automated pipeline from creating ten nearly identical folders for an input defect that requires a human correction.

A novice diagnostic sequence

  1. Read the first error or termination message, not merely the last console line.
  2. Identify the stage: parsing, data loading, model evaluation, estimation, covariance, or output writing.
  3. Correct parsing, file, configuration, and data failures before retrying.
  4. For estimation failures, inspect initial predictions, parameter bounds, residual variance, and ETA covariance.
  5. Use retry only when alternative starts are scientifically and numerically reasonable.
  6. If several starts converge to different parameter vectors or OFVs, investigate local optima rather than selecting the most attractive result automatically.

Common mistakes

  • Retrying a misspelled dataset path.
  • Treating an unsuccessful covariance step as equivalent to nonconverged minimization.
  • Ignoring the stage where failure occurred.
  • Selecting a retry only because its OFV is lowest across noncomparable models or datasets.

Checklist

  • Record the exact termination and stage.
  • Separate setup failures from numerical estimation failures.
  • Verify that all attempts use the same model and data.
  • Investigate repeated failures rather than increasing N indefinitely.

Further reading

See troubleshooting covariance and F_FLAG problems and validation boundaries.