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

st: creating a list showing only highest values


From   Michael McCulloch <[email protected]>
To   [email protected]
Subject   st: creating a list showing only highest values
Date   Wed, 08 Dec 2004 14:54:24 -0800

Hello Statalist members,
I have a set of trials, which have one, two, or three year follow-up.
I would like to create a list from these trials showing only the number surviving at the longest point of follow-up.
For example, in the list below I would to show only the one year data for trial id==43, and two year data for id==14.
I have explored the help for if, bysort, and exp, without any luck.
Can this be done without programming (as I have not learned this yet)?

. list id sixmo1 oneyr1 twoyr1 threeyr1 if exc==0

+-------------------------------------------+
| id sixmo1 oneyr1 twoyr1 threeyr1 |
|-------------------------------------------|
1. | 43 12 7 . . |
2. | 191 13 2 . . |
3. | 22 15 5 . . |
5. | 14 16 14 3 . |



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