<p>Statisticians object to this kind of pre-testing. This is a form of stepwise regression, <a href="https://stats.stackexchange.com/q/20836/247274">a methodology known to be problematic</a>.</p>
<blockquote>
<p><a href="https://stats.stackexchange.com/q/156093/247274">“Stepwise regression model-building is…pants.”</a></p>
</blockquote>
<p>Two issues particularly bother me, both of which are discussed further in the links.</p>
<ol>
<li><p>If you do any kind of testing (keep in mind that confidence intervals are just inverses of tests), the p-values are lying, since you also should condition on having performed a pre-test (but the usual p-values do not do this). This corresponds to criticisms 2 and 4 in the Harrell article I link at the end of this post.</p>
</li>
<li><p>Even if you just want to predict, your measures of performance are likely to be inflated. In particular, <span class="math-container">$R^2_{adj}$</span> and the usual “unbiased” estimator of error term variance will use the degrees of freedom from the model fitted after the pre-test. However, you did consider that additional variable, and it should count towards the degrees of freedom. This corresponds to criticism #1 in the Harrell article I link at the end of this post.</p>
</li>
</ol>
<p><a href="https://www.stata.com/support/faqs/statistics/stepwise-regression-problems/" rel="nofollow noreferrer">Frank Harrell</a> and <a href="https://statmodeling.stat.columbia.edu/2014/06/02/hate-stepwise-regression/" rel="nofollow noreferrer">Andrew Gelman</a> have written some thoughts on stepwise regression that expand on my comments here.</p>

CC BY-SA 4.0
2022-09-13T02:25:49.547Z
2022-12-24T13:40:15.113Z
2022-12-24T13:40:15.113Z
Dave
<p>I have completed an F-test on the variable which gives p = 0.6, should I remove it from the model? </p>

CC BY-SA 4.0
2020-04-29T13:50:35.603Z
Yes you can. If it is just a simple dummy variable for a single observation then it is orthogonal to other variables in the model and is just eating up one degree of freedom. So unless there is a theoretical reason for including I would remove.
Andrew M
CC BY-SA 4.0
2020-04-29T18:31:59.710Z
Can you present the model? It would be interesting to know *what* the variable is. Also what F-test deals with a single variable, there is more going on than a simple test of significance. Please provide your results!
Brennan
CC BY-SA 4.0
2020-04-30T00:37:52.213Z
If you are interested in causal relationship, pretesting is dangerous.
chan1142
<econometrics><statistics>
If a dummy variable is insignificant can I remove it from the regression?
Mark
# If a dummy variable is insignificant can I remove it from the regression?

(Asked by: username_0 on 2020-04-29)

I have completed an F-test on the variable which gives p = 0.6, should I remove it from the model?

**Tags:** econometrics, statistics
> **Comments:**
> **username_1**: Yes you can. If it is just a simple dummy variable for a single observation then it is orthogonal to other variables in the model and is just eating up one degree of freedom. So unless there is a theoretical reason for including I would remove.  
> **username_2**: Can you present the model? It would be interesting to know *what* the variable is. Also what F-test deals with a single variable, there is more going on than a simple test of significance. Please provide your results!  
> **username_3**: If you are interested in causal relationship, pretesting is dangerous.  

---

## 1 answers

### Answer by username_4 on 2022-09-13. Score: 3

Statisticians object to this kind of pre-testing. This is a form of stepwise regression, [a methodology known to be problematic](https://stats.stackexchange.com/q/20836/247274).

> [“Stepwise regression model-building is…pants.”](https://stats.stackexchange.com/q/156093/247274)

Two issues particularly bother me, both of which are discussed further in the links.

1. If you do any kind of testing (keep in mind that confidence intervals are just inverses of tests), the p-values are lying, since you also should condition on having performed a pre-test (but the usual p-values do not do this). This corresponds to criticisms 2 and 4 in the Harrell article I link at the end of this post.
2. Even if you just want to predict, your measures of performance are likely to be inflated. In particular, $R^2\_{adj}$ and the usual “unbiased” estimator of error term variance will use the degrees of freedom from the model fitted after the pre-test. However, you did consider that additional variable, and it should count towards the degrees of freedom. This corresponds to criticism #1 in the Harrell article I link at the end of this post.

[Frank Harrell](https://www.stata.com/support/faqs/statistics/stepwise-regression-problems/) and [Andrew Gelman](https://statmodeling.stat.columbia.edu/2014/06/02/hate-stepwise-regression/) have written some thoughts on stepwise regression that expand on my comments here.


---

