Abstract: We apply the methods developed by Lockhart et al. (2013) and Taylor et al. (2013) on significance tests for penalized regression to forward stepwise model selection. A general framework for selection procedures described by quadratic inequalities includes a variant of forward stepwise with grouped variables, allowing us to handle categorical variables and factor models. We provide an algorithm to compute a new statistic with an exact null distribution conditional on the outcome of the model selection procedure. This new statistic, which we denote $T_\chi$, has a truncated $\chi$ distribution under the global null. We apply this test in forward stepwise iteratively on the residual after each step. The resulting method has the computational strengths of stepwise selection and addresses the problem of invalid test statistics due to model selection. We illustrate the flexibility of this method by applying it to several specialized applications of forward stepwise including a hierarchical interactions model and a recently described additive model that adaptively chooses between linear and nonlinear effects for each variable.
The Challenge of Post-Selection Inference
In classical statistical inference, we typically assume that the model structure is fixed before the data is observed. However, in modern data science, we frequently employ model selection algorithms—like forward stepwise regression—to identify the most relevant predictors from a large pool of candidates. This practice introduces a significant bias known as "double-dipping": using the same data to both select a model and test its significance.
When an algorithm "cherry-picks" the variable most correlated with the outcome, standard $\chi^2$ and $F$-tests fail to account for the search process. This leads to "anti-conservative" p-values that are heavily biased toward zero, making random noise appear as a significant discovery. This paper introduces the $T_\chi$ statistic to provide valid, exact p-values by conditioning on the selection process itself.
The $T_\chi$ Statistic and Quadratic Framework
The authors' key contribution is extending post-selection inference to forward stepwise selection, particularly for grouped variables (such as categorical factors). They demonstrate that the event of a specific variable being chosen can be described through a set of quadratic inequalities.
Instead of following a standard $\chi$ distribution, the proposed $T_\chi$ statistic follows a truncated $\chi$ distribution. By calculating the probability of observing a result given that it was the maximum among all candidates, the test "corrects" for the selection bias. This test is applied iteratively: after a variable is added, the algorithm moves to the residuals and repeats the test for the next candidate.
As shown in the table above, standard $\chi^2$ p-values often drop to 0.00 immediately, falsely suggesting high significance, whereas $T_\chi$ provides a more nuanced and valid measure of significance as the selection path progresses.
Performance and Empirical Results
The method was evaluated using both simulated and real-world datasets. In null simulations (where no true signal exists), the $T_\chi$ p-values were found to be uniformly distributed between 0 and 1, confirming their validity. In contrast, standard methods incorrectly suggested significance in nearly every trial.
Beyond validity, the test maintains high power—the ability to detect real signals. In Gaussian and categorical designs, the method successfully identifies true predictors even as the sparsity of the model increases.
Computational Efficiency and Real-World Application
A major advantage of the $T_\chi$ statistic is its computational speed. In testing, the $T_\chi$ calculation was approximately 10 times faster than Monte Carlo simulations, making it viable for high-dimensional datasets.
The authors applied the method to the HIVdb dataset, using genomic mutations to predict drug resistance. In this high-dimensional categorical setting, the $T_\chi$ test successfully identified known mutations while providing a principled "stopping rule" to prevent the inclusion of noise variables.
Conclusion and Future Work
The $T_\chi$ statistic provides a robust solution to the problem of invalid inference in forward stepwise selection. While currently slightly conservative due to the independence of steps, it offers a significant improvement over traditional methods. Future work aims to incorporate all previous selection constraints to provide even more precise p-values and to release an R package for broader accessibility.
Summary updated