33.8 Forward, backward, and stepwise covariate selection
Selection runs on the best unadjusted structural shape or selection_model. Forward adds the candidate with the largest qualifying likelihood-ratio improvement; backward removes the least qualifying non-forced term. Stepwise performs both phases. The final selected set is then used for all candidate shapes.
Command or configuration pattern
nlmx er er.csv --er-covariates BASE,AGE,SEX,ECOG,ALB --er-selection stepwise ...
The relevant controls are: covariate_selection; p_forward=0.05; p_backward=0.01; forced_covariates; selection_model. Use the complete command and settings index for accepted values, defaults, CLI mappings, and settings-only controls.
A reliable operating sequence
- State the endpoint estimand, exposure metric/window/units, analysis population, adjustment set, and clinically useful contrast.
- Reconcile input rows, subjects, arms, exposure availability, endpoint information, and all endpoint-specific fields.
- Run the smallest useful specification first; inspect exclusions and eligible models before adding subgroups, selection, or bootstrap.
- Read absolute predictions and observed support alongside relative effects, information criteria, p-values, and diagnostics.
- Archive the command,
.erfile, mutated/used data, exclusions, transcript, tables, plots, report, version, and checksums.
How to read and review the result
Read every row of _covariate_selection.csv: phase, step, candidate, degrees of freedom, old/new OFV, change, p-value, and decision. Different entry/removal thresholds can add then remove a variable. Selection is exploratory and its final standard errors do not include selection uncertainty.
For a novice, the safest reading order is er_summary.txt → er_analyses.csv → the analysis-specific exclusions and model table → effects/predictions → diagnostic plots → row-level data → report.html. The report is a presentation layer; the CSV/JSON files and transcript are the audit layer.
Quality-control questions
- Did the number of analysed subjects, events, categories, exposure groups, and visits match the specification?
- Were placebo, active zeros, missing values, filters, repeated rows, categories, offsets, censoring, and covariate references handled as intended?
- Were ineligible fits retained and explained rather than silently dropped or allowed to win?
- Does the reported contrast stay inside exposure support, and are its units and endpoint direction clear?
- Do diagnostics and sensitivities support the same decision, and are causal and transportability limits explicit?
Common failure modes
- Treating the best criterion or smallest p-value as a clinical conclusion.
- Reading an odds, rate, or hazard ratio without its exposure contrast and absolute outcome context.
- Overwriting an evidence directory before preserving the prior settings, log, and checksums.
Navigation
See the previous page, next page, and complete command and settings index.