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

Re: st: resticting the sample?


From   "Dimitriy V. Masterov" <[email protected]>
To   [email protected]
Subject   Re: st: resticting the sample?
Date   Wed, 6 Oct 2004 16:56:22 -0500 (CDT)

Your can use preserve/restore to do this:

preserve
	keep if age<40
	reg ....
restore

DVM

On Wed, 6 Oct 2004, Shuaizhang Feng wrote:

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

_______________________________________________________________________________
Dimitriy V. Masterov

Work:
Center for Social Program Evaluation
1155 East 60th St. Room 038
Chicago, IL 60637
Work: (773)256-6005
Fax: (773)256-6313

Home:
1312 East 53rd St., Apt.309
Chicago, IL 60615
Mobile: (773)220-2760

Skype:
dvmmaster

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