22.2 The complete covariate workflow
A defensible workflow begins before nlmx cov and ends after it. Use six stages.
- Qualify the base model. Confirm data/event interpretation, convergence, covariance, residual diagnostics, parameter plausibility, and intended use.
- Define scope. Choose scientifically plausible parameter–covariate pairs, types, references, equations, missingness rules, and mandatory/excluded relationships.
- Inspect and validate. Use
nlmx inspectandnlmx validateto review detected types, levels, ranges, references, equations, artifact identity, and numerical prerequisites. - Select. Run frozen, SCM, posterior, or both with prespecified thresholds, multiplicity, uncertainty, seeds, and computation limits.
- Jointly refit and diagnose. Re-estimate retained effects with base parameters, review convergence, uncertainty, shrinkage, GOF, stability, and clinical effects.
- Confirm and report. Fit the generated draft in the target workflow, compare predictions and likelihood, run VPC/external validation as needed, and document decisions.
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
covas 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.