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

Re: st: Excluding some cases for regression analysis


From   "Neil Shephard" <[email protected]>
To   [email protected]
Subject   Re: st: Excluding some cases for regression analysis
Date   Mon, 25 Jul 2005 12:05:21 +0100

> I have an unbalanced panel of more than 3000 firms. The firms have
> been assigned id from 1 to 3256. I was wonderting if i could exclude
> some firms (say id 45 to 560) when I run any regression. How could I
> do so? Best, Alice

-man regress- indicates that you can use the [ if exp ] statememnt, thus you can see the 
help for -man if- and -man operators- to construct a logical statement which will exclude 
individuals.

Assuming you have a dependent variable y and an independent variable x with the 
variable id as described above...

regress y x if(id < 45 | id > 560)

You will also want to read the User Manual Chapters 14 and 16 if you haven't already.

HTH's

Neil 
Neil Shephard
Genetics Statistician
ARC Epidemiology Unit, University of Manchester
[email protected]
[email protected]

"If your result needs a statistician then you should design a better experiment" - 
Ernest Rutherford

*
*   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