st: Programming Problem

Hm, somehow my posting got returned and. Hence, I send it again, hopefully
that will not be a double posting.

GT

_____________________

Hi!!

My topic is not so much a specific or technical question, but a full-scale
request for help. I already did a quick and dirty solution working with
many dummy variables. Unfortunately, it turned out to be neither elegant
nor "quick".

My problem: I would like to program a vote --> seat conversion in electoral
systems applying the d'Hondt formula. Hence, in my dataset each observation
consists of the absolute number of votes for each party i (v1, v2, v3, ...,
vi) and I want to obtain the respective number of seats (m1, m2, m3, ...,
mi). The d'Hondt highest averages method, applied in an electoral district
returning m seats, works as follows: The absolute vote numbers are divided
by a sequence of integers which, in case of d'Hondt, is simply 1,2,3,...,
and the m seats are sequentially awarded to the parties with the highest
averages.