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

st: RE: creating a list sh-owing only highest values


From   "Dev Vencappa" <[email protected]>
To   <[email protected]>
Subject   st: RE: creating a list sh-owing only highest values
Date   Thu, 09 Dec 2004 13:41:55 +0000

>>

Nick, would max() do the job here? It seems that he wants the listing of only the highest of these four recording periods. I think max() will only retrieve the largest number from these, but not the highest period?

Dev

>>> [email protected] 12/09/04 1:34 pm >>>
-max()- function ? 

Nick 
[email protected] 

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]]On Behalf Of Michael
> McCulloch
> Sent: 08 December 2004 22:54
> To: [email protected] 
> Subject: st: creating a list showing only highest values
> 
> 
> 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/


This message has been scanned but we cannot guarantee that it and any
attachments are free from viruses or other damaging content: you are
advised to perform your own checks.  Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.


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