Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Victor Zammit" <vmz@go.net.mt> |
To | <statalist@hsphsun2.harvard.edu> |
Subject | st: Challenging problem. |
Date | Thu, 22 Mar 2012 14:23:27 +0100 |
Dear Stata Users,The following is a table,representing the results five counts in a local election with 1352 valid ballots.
The electing quota for a candidate was 320.Candidate #3,can_3,is elected in the first count,c1,
with first preference.The extra votes,721-320 = 401,get distributed proportionately to
the candidates that receive second preference,after can_1's (first preference) votes.
can c1 c2 c3 c4 c5 can_1 295 423 423 320 320 can_2 20 39 58 90 0 can_3 721 320 320 320 320 can_4 253 442 320 320 320 can_5 63 102 203 270 356 n-t.v. 0 26 28 32 36 total 1352 1352 1352 1352 1352Subtracting c1 from c2, gives the proportinate amounts that were distributed to the other
candidates and the proportionate amount of the non-transferable votes,n-t.v.,from which,can be
derived the second prefernce that each candidate and non transferables ,receive.
pref_2 = [[ c2-c1]/401] * 721, format pref_2 %3.0f . can c1 c2 p_dist pref_2 can_1 295 423 128 230 can_2 20 39 19 34 can_3 721 320 0 0 can_4 253 442 189 340 can_5 63 102 39 70 n-t.v. 0 26 26 47The extra over 320 for can_4 and after that,can_1,are dealt with similarly.In the fourth count,
the accumulation of 90 votes for can_2,are distributed directly on can_5 and n-t.v. .
Given this information,is it possible to simulate the 1352 ballots?.I appreciate any feedback..
Victor Zammit * * 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/