Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: stepwise regression with force statment


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: stepwise regression with force statment
Date   Fri, 6 Jun 2003 18:19:55 +0100

Liping Huang

> Does anyone know the syntax about a stepwise regression but 
> force some
> independent variables into the model? I know how to do the 
> stepwise but
> couldn't find the syntax to force the model including some 
> variables.

I don't think there is one in -sw-, and with very good reason. 

I think you can't have it both ways. If you want your model
to be selected by whatever addition or removal criteria you specify, 
you can't also say a priori that certain predictors must belong 
in the model. 

What you could try, I suppose, is 

	1. regress response on the predictors you believe in 

	2. put the residuals from that into a stepwise as 
	response with all the other predictors. 

but quite how you put that all together, and what status 
it has, is anybody's guess. 

Better advice, I think, is to seek out Frank Harrell's 
"Regression modeling strategies" for a long list of reasons 
why stepwise is a very bad idea. 

Nick 
[email protected] 

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index