Documentation

39.20 Troubleshooting fit, covariance, and controlled retry

39.20 Troubleshooting fit, covariance, and controlled retry

What you will learn

  • Separate estimation, covariance, and diagnostics
  • Use retry only for eligible numerical failures
  • Compare all successful solutions before acceptance

Prerequisites: Chapter 36 exit-code reference, Chapter 38 output completion, and the Chapter 39 overview.

This page describes nlmx 4.16.2. Troubleshooting must preserve the failed attempt: keep its exact command, working directory, log, resolved settings, input/model identities, partial outputs, and process exit code. Correct one causal condition at a time and compare the new evidence with the failed run. Never convert a nonzero exit into success in a wrapper, and never interpret exit 0 as scientific acceptance without the command-native verdict.

A fit has several outcomes: the model can evaluate; individual modes can converge; population estimation can terminate; parameters can satisfy constraints; covariance can succeed; predictions/diagnostics can be written; and the result can be scientifically acceptable. Report each separately.

Before retry, inspect the earliest failing stage and trace. Check data/events/units, model domains, initial estimates, parameter scaling/bounds, ETA/SIGMA structure, subjects with extreme contributions, ODE tolerances, gradients, and condition/correlation. Use autoinit or model screening only as intended methods, not automatic repair.

--retry is for numerical failure. It does not retry usage, I/O, configuration, unsupported-feature, artifact, or data errors. Each attempt should have a deterministic seed/policy and retained folder. Prespecify maximum attempts, perturbation size/modes, and selection rule. A retry that converges to a different basin requires sensitivity/identifiability review.

Compare objective values only for the same likelihood/data and compatible constants/method. Examine estimates, relative SE/CI, covariance status, correlations, boundary estimates, gradients, predictions, residuals, excluded records, and warnings. If covariance fails, do not report standard errors from a stale or unrelated matrix. Archive the chosen attempt plus the full retry lineage and rationale.

Page checklist

  • Did you retain the exact exit code, stage, message, hint, log, and partial output?
  • Did you identify one causal layer before changing anything?
  • Is the recovery a new, traceable attempt with the same intended estimand?
  • Did you check command-native and scientific acceptance after process completion?

See the previous page, next page, and complete error reference.