I've commented in another posting with a different
solution. Note that this one can be streamlined
a little.
egen max = rmax(conpc, labpc, ldmpc, natpc, othpc)
foreach x in con lab ldm nat oth {
gen `x'win = max == `x'pc
}
drop max
Nick
[email protected]
Matt Dobra
> Not that elegant, and might be problematic should the data
> show a tie, but:
>
> egen max=rmax(conpc, labpc, ldmpc, natpc, othpc)
> foreach x in con lab ldm nat oth {
> egen `x'win=diff(`x'pc max)
> recode `x'win (1=0) (0=1)
> }
> drop max
*
* 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/