21.21 Stratification: finding bias hidden by pooling
--gof-stratify COL adds the five standard GOF plots for each level of a dataset column after the pooled set. The column can be found by header name or $INPUT label, case-insensitively. nlmx draws at most 24 levels and records the levels in filenames and report sections.
nlmx fit run101.ctl --plots --gof-stratify STUDY
nlmx fit run101.ctl --plots --gof-stratify DVID
Stratify prospectively on variables that can change structure, error, or decision relevance: study, formulation, route, dose, occasion, site/laboratory, renal group, age group, or endpoint. Opposite subgroup biases can cancel in a pooled smoother, creating a Simpson-type appearance of adequacy.
Every stratum requires context. Report observation and subject counts, prediction/time ranges, sampling schedules, and missingness. A group with five observations cannot support the same visual conclusion as one with five hundred. Different x ranges can make separate panels appear inconsistent even when they occupy nonoverlapping regions; use common limits or interpret support carefully.
Avoid indiscriminate fishing across dozens of categories. Prespecify primary diagnostic strata, then label exploratory findings as such. If a pattern suggests a covariate or structural effect, confirm it in a population model comparison rather than selecting from visual appearance alone.
Common mistakes
- Reviewing only pooled diagnostics.
- Comparing strata with different scales and support as if matched.
- Ignoring subject counts and design imbalance.
- Creating so many post hoc strata that chance patterns dominate.
- Treating a visual subgroup trend as an estimated covariate effect.
Checklist
- Prespecify scientifically relevant strata.
- Retain the pooled overview.
- Report rows, subjects, range, and design per stratum.
- Use comparable axes where possible.
- Test material findings in a controlled model workflow.
Further reading
Continue with filtering, DVID, and Chapter 22 covariate-modeling concepts.