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

Re: st: Winning and losing


From   "Clive Nicholas" <[email protected]>
To   [email protected]
Subject   Re: st: Winning and losing
Date   Fri, 21 Nov 2003 17:48:47 -0000 (GMT)

Matt,

Thanks ever so much for your solution: I'll see if can try it out! :-)

C.

> Statapeep,
>
> 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

Yours,
CLIVE NICHOLAS,
Politics Building,
School of Geography, Politics and Sociology,
University of Newcastle-upon-Tyne,
Newcastle-upon-Tyne,
NE1 7RU,
United Kingdom.
*
*   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/



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