Hello everyone,
Suppose I have a variable " Age". I wish to find out at which
observation does age have a max at. One way to do this is to write a
while loop. I think that's horrid.
I guess I could do : -
egen mAge=max(Age)
gen index=_n if Age==mAge
But this puts the right value of _n only in ONE observation. I can
play around with 0's and use egen total to get this in ALL
observations , but I was wondering if anyone knew a DIRECT way of
doing this in one go.
Thank you,
Ashim,
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/