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

st: max value

From   "Ronnie Babigumira" <>
To   "Statalist" <>
Subject   st: max value
Date   Tue, 8 Apr 2003 13:23:42 +0200

Hi (stata8, win2k)
I have 3 variables p1 p2 p3. I need to generate a new variable pred

"pred" ==
1 if p1 is the largest of the 3,
2 if p2 is the largest
and 3 if p3 is the largest

Any elegant ideas (thats all I seem to get from the list and for that I am
forever grateful)


*   For searches and help try:

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