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

Re: st: RE: resticting the sample?


From   Daniel Egan <[email protected]>
To   [email protected]
Subject   Re: st: RE: resticting the sample?
Date   Thu, 7 Oct 2004 14:36:33 -0400

Just my two cents - I do this on a regular basis using indicator
variables, usually heirarchically ordered indicating level (more
restrictive) of filtering

sysuse auto
gen valid_f==0
replace valid_f=1 if foreign==1
tab price if valid_f==1
gen valid_fp=valid_f
replace valid_fp=0 if price>10000
.......etc

reg blah blah if valid_fp==1

This is less useful if you are looking for on-the-fly restrictions I suppose.
*
*   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