Variable Selection
Select Variables for the Decision, Then Test the Selection Honestly
A selected model is a procedure, not just a list
Variable selection begins with the target use. Prediction can favor variables that improve future out-of-sample accuracy, while explanatory or causal work must also ask whether a variable is a confounder, a mediator, a collider, or a post-outcome measurement.
A variable is not automatically useful merely because it is available, correlated with the response, or statistically significant in one fitted sample.
Selection on the same data used to report performance can overfit noise. Hold out a test set or use a properly nested resampling procedure: all selection decisions, including preprocessing and tuning, occur inside each training portion, and the untouched assessment portion is used only for evaluation.
Training error nearly always looks optimistic after searching among many models. Cross-validation can estimate expected prediction error, but its folds, preprocessing, and selection steps must respect time, groups, or other dependence in the data.
Prevent leakage by using only information that would be available at the time of the intended prediction. A field recorded after an outcome, a label-derived administrative code, or a future measurement can make a model appear excellent while making it unusable in deployment.
Correlated predictors also require judgment: selection may be unstable when several variables carry nearly the same signal, so apparent inclusion or exclusion can change across samples without proving that a causal effect is present or absent.
Report the chosen variables, candidate set, validation design, performance metric, missing-data handling, and uncertainty. Do not substitute a selection algorithm for subject-matter review, diagnostics, or a causal design. The point is a reproducible decision rule whose claimed performance has not been evaluated on information it already saw.
A team tries many predictor subsets and tunes each model on a training set. Which evidence best supports choosing among the final candidates for future prediction?
Two predictors measure nearly the same underlying construct and are strongly correlated. Repeated samples lead a selection procedure to choose the first predictor in some samples and the second in others, with similar validation error. What is the best interpretation?