Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Generating New variable for best measurement
From
Eric Booth <[email protected]>
To
[email protected]
Subject
Re: st: Generating New variable for best measurement
Date
Thu, 2 Jan 2014 19:48:29 -0600
<>
Assuming ‘best’ means highest/max value for these variables, you can run:
egen varBest = rowmax(var00?)
or
egen varBest = rowmax(var001 var002 var003 var004)
See -help egen-
- Eric
[email protected]
On Jan 2, 2014, at 7:42 PM, Witness Chirinda <[email protected]> wrote:
> Dear All,
> I have measurements of a test taken at four different times. i.e
> (var001, var002, var003 and var004). I want to generate a new variable
> (varBest) which takes the best of the four measurements for each
> individual.
> Any advice on how to go about this would be greatly appreciated
> Thanks!
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/