[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
Liping Huang <LHuang@vnsny.org> |

To |
"'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu> |

Subject |
st: FW: RE: stepwise regression with force statment |

Date |
Fri, 6 Jun 2003 13:58:32 -0400 |

Thanks for Nick's suggestion. Sorry I didn't state clear for what is the reasons make me to think about using stepwise regression model but force the model including some variables. In fact, before running the model, I've done all different tests and cautiously selected the variables that I'd like to put into the model. Although I've know some of variables are significant in the model, however, for the purpose of showing the entire relationship of a dependent variable with a group of length of stay variables, such as 10 days, 20 days, and etc, to someone else, I'd like to force these variables into to model. That's the story. Actually I found the code about how to doing it: sw regress depvar (var1-var3) var4 ..., pr(.05) lockterm1 -----Original Message----- From: Nick Cox [mailto:n.j.cox@durham.ac.uk] Sent: Friday, June 06, 2003 1:20 PM To: statalist@hsphsun2.harvard.edu Subject: st: RE: stepwise regression with force statment 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 n.j.cox@durham.ac.uk * * 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/ * * 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/

**Follow-Ups**:**st: RE: FW: RE: stepwise regression with force statment***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

- Prev by Date:
**RE: st: RE: RE: highest scalar of a matrix** - Next by Date:
**st: Re: Selecting part of a LARGE file** - Previous by thread:
**st: Re: graphing and shading** - Next by thread:
**st: RE: FW: RE: stepwise regression with force statment** - Index(es):

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