Documentation

22.2 The complete covariate workflow

A defensible workflow begins before nlmx cov and ends after it. Use six stages.

  1. Qualify the base model. Confirm data/event interpretation, convergence, covariance, residual diagnostics, parameter plausibility, and intended use.
  2. Define scope. Choose scientifically plausible parameter–covariate pairs, types, references, equations, missingness rules, and mandatory/excluded relationships.
  3. Inspect and validate. Use nlmx inspect and nlmx validate to review detected types, levels, ranges, references, equations, artifact identity, and numerical prerequisites.
  4. Select. Run frozen, SCM, posterior, or both with prespecified thresholds, multiplicity, uncertainty, seeds, and computation limits.
  5. Jointly refit and diagnose. Re-estimate retained effects with base parameters, review convergence, uncertainty, shrinkage, GOF, stability, and clinical effects.
  6. Confirm and report. Fit the generated draft in the target workflow, compare predictions and likelihood, run VPC/external validation as needed, and document decisions.
The complete covariate workflow

Each stage can stop the analysis. A base model with an ill-conditioned covariance cannot safely support uncertainty propagation. A scope with undocumented missing-value handling is not ready for selection. A final model that fails to converge is not rescued by a strong screening p-value.

Preserve separate output directories for each method and sensitivity. Archive normalized configuration, input manifest, logs, refit caches, reports, tables, draft model, and checksums. Reusing a cache is efficient only when its identity matches the current run.

Common mistakes

  • Treating cov as a one-command automatic final-model generator.
  • Skipping base-model diagnostic qualification.
  • Editing scope after seeing results without labeling exploration.
  • Interpreting screening coefficients as final estimates.
  • Failing to refit and diagnose the retained set jointly.

Checklist

  • Qualify the base model and artifacts.
  • Prespecify scope, forms, references, and missingness.
  • Inspect the resolved candidate catalogue.
  • Run the chosen method with recorded settings.
  • Refit, diagnose, confirm, and report the final model.

Further reading

See base-model readiness, scope declaration, and validation.