Bookmark and Share

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]

st: RE: Generating New variable for best measurement


From   "Sarah Edgington" <[email protected]>
To   <[email protected]>
Subject   st: RE: Generating New variable for best measurement
Date   Thu, 2 Jan 2014 17:50:55 -0800

What do you mean by "best of the four measurements"?

If by best you mean highest then you should be able to get what you want
with:
gen varbest=max(var001,var002,var003,var004)

This will work assuming that each individual is represented by a single
observation.  If not, you'll need to give more details of what your data
look like.

-Sarah

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Witness Chirinda
Sent: Thursday, January 02, 2014 5:42 PM
To: [email protected]
Subject: st: Generating New variable for best measurement

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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index