Statalist,
I have a series of variables, say x1-x10, and I would like to determine
the numeric suffix associated with the variable that has the maximum
value for each case. For example, maybe x9 has the max for case 1 and
x7 has the max for case 2, then I would like to end up with a variable,
say MaxX, that has a 9 and 7 for the first two cases respectively. I
think a data loop is the way to go, but I've tried working out a loop to
do this and it's not coming to me.
Thanks,
Shawn
*
* 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/