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

Re: st: How to list just the first case meeting a selection criterion?


From   Michelle Garrison <garrison@u.washington.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: How to list just the first case meeting a selection criterion?
Date   Mon, 27 Jun 2005 16:15:23 -0700

You could do:

* sort county precinct
* by county precinct: list name address1 address2 county precinct city state if _n == 1

There may well be a more streamlined method, though.

paul gronke wrote:

I am dealing with an extremely large (2 gig) dataset and wish to list
just the first case that meets a set of criteria. There are about 200
separate sets of criteria (county and precinct values).

Thus, I'd like a command that does something like:

list name address1 address2 county precinct city state
if [first one of] county=VALUE & precinct=VALUE
repeated about 200 times.

--
___________________________________________________

Michelle Garrison, M.P.H. -- Research Consultant
Child Health Institute, University of Washington
office: (206) 616-1203 fax: (206) 616-4623
campus mailbox 354920
e-mail: garrison@u.washington.edu ___________________________________________________

*
* 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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index