[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Winning and losing
Yeah, I know, I know. I'm being greedy!! But this problem may tickle your
In my very same dataset, I'm looking to dummy-code (0/1) which party won
the ith seat in the jth election. Since this is Blighty, there can only be
one winner per district, but since that n=3452, that's an awful lot of
outcomes to code manually! There are five outcome categories: conwin;
labwin; ldmwin; natwin; and othwin.
Now here's the rub: since it's plurality-rule, I need to tell Stata to
code, say, conwin=1 and labwin-othwin=0 if, say, for district X: conpc=35;
labpc=31; ldmpc=16; natpc=17; othpc=1. I've tried several generates, such
-g conwin=0 if conpc > labpc & ldmpc & natpc & othpc-
-replace conwin=1 if conpc < labpc & ldmpc & natpc & othpc-,
but, although Stata did not return errors at *any* of my 'solutions', each
kept producing multiple, rather than unique, 1's for each case (or n).
Any ideas as to where I'm going wrong?
School of Geography, Politics and Sociology,
University of Newcastle-upon-Tyne,
* For searches and help try: