Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Keeping the Earliest Observations on Each Leg


From   "Michael Blasnik" <[email protected]>
To   <[email protected]>
Subject   st: Re: Keeping the Earliest Observations on Each Leg
Date   Mon, 12 Jun 2006 20:00:52 -0400

bysort id lleg (date): keep if _n==1

note: any ties on date will be rboken arbitrarily

Michael Blasnik
[email protected]

----- Original Message ----- From: "Raphael Fraser" <[email protected]>
To: <[email protected]>
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/




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