bysort id lleg (date): keep if _n==1
note: any ties on date will be rboken arbitrarily
Michael Blasnik
michael.blasnik@verizon.net
----- Original Message -----
From: "Raphael Fraser" <raphael.fraser@gmail.com>
To: <statalist@hsphsun2.harvard.edu>
Sent: Monday, June 12, 2006 7:11 PM
Subject: st: Keeping the Earliest Observations on Each Leg
>I am interested in keeping the earliest observations on each leg
> where left leg is denoted (lleg=1) and right leg (lleg=0). Can anyone
> assist?
>
> id date lleg
> 46 22aug1993 0
> 46 28sep1993 1
> 46 28sep1993 1
<snip>>
*
* 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/