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

st: RE: resticting the sample?


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: resticting the sample?
Date   Wed, 6 Oct 2004 22:59:18 +0100

gen mysample = (age < 40) & (nobel_prize == 1) & (extrasensoryperception == 1) 

...

reg ... if mysample 

See also http://www.stata.com/support/faqs/data/trueorfalse.html

Nick 
[email protected] 

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Shuaizhang
> Feng
> Sent: 06 October 2004 22:53
> To: [email protected]
> Subject: st: resticting the sample?
> 
> 
> Dear all:
> 
> I want to restrict my sample first and then use the
> resticted sample in my regressions. Is there a compact
> way to do this.
> 
> for example, I want to run regression on age<40. but I
> don't want to add "if age<40" for every regressions I
> do, as it would be too long ( I have a bunch of other
> stuffs). is there an alternative way to do this?
> 
> Thanks a lot in advance.
> 
> shuaizhang 
> 
> 
> 		
> _______________________________
> Do you Yahoo!?
> Declare Yourself - Register online to vote today!
> http://vote.yahoo.com
> *
> *   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/



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