*--------------------------------------------------------------------------- * elecdisp_example.do * Example use of the elecdisp command * * Copyright (C) 2026 Oscar Martínez Coello * SPDX-License-Identifier: MIT *--------------------------------------------------------------------------- clear set more off * Create example election data input int party double vote_share seat_share int election_id 1 10.56 9.34 1 2 12.34 4.63 1 3 30.43 40.45 1 4 24.13 30.12 1 5 12.56 11.23 1 6 9.98 4.23 1 1 13.56 20.34 2 2 8.76 3.45 2 3 3.23 0.00 2 4 18.94 25.98 2 5 12.87 16.34 2 6 1.43 0.00 2 7 10.67 10.32 2 8 21.09 18.34 2 9 9.45 5.23 2 1 3.45 0.00 3 2 3.45 0.00 3 3 7.34 11.90 3 4 3.89 0.00 3 5 1.19 0.00 3 6 45.67 50.34 3 7 20.45 24.42 3 8 14.56 13.34 3 1 4.56 0.00 4 2 21.00 18.76 4 3 67.43 80.00 4 4 2.45 0.00 4 5 4.56 1.24 4 1 50.45 90.43 5 2 2.34 0.00 5 3 3.99 0.00 5 4 6.34 1.23 5 5 7.75 0.90 5 6 3.45 0.00 5 7 20.01 5.32 5 8 5.67 2.12 5 1 3.45 0.00 6 2 4.34 2.34 6 3 3.42 4.34 6 4 2.45 1.20 6 5 1.88 0.60 6 6 3.56 0.00 6 7 70.56 85.93 6 8 10.34 5.59 6 1 10.34 2.34 7 2 11.24 3.45 7 3 13.45 4.32 7 4 20.34 30.45 7 5 25.45 35.23 7 6 3.45 5.55 7 7 3.24 3.40 7 8 3.12 8.42 7 9 5.34 2.31 7 10 4.03 4.53 7 1 34.45 58.54 8 2 32.34 34.56 8 3 12.45 1.01 8 4 10.20 0.36 8 5 2.34 0.00 8 6 1.35 0.00 8 7 6.87 5.53 8 1 34.56 66.64 9 2 34.45 20.23 9 3 20.41 10.34 9 4 10.34 2.79 9 5 0.24 0.00 9 1 34.45 70.43 10 2 32.01 20.78 10 3 20.34 8.79 10 4 10.38 0.00 10 5 2.34 0.00 10 6 0.48 0.00 10 1 45.34 50.42 11 2 21.34 18.45 11 3 10.34 9.45 11 4 10.02 9.45 11 5 12.96 12.23 11 1 10.34 20.34 12 2 14.56 26.34 12 3 18.91 13.24 12 4 11.23 1.81 12 5 17.23 4.14 12 6 10.34 29.34 12 7 8.43 1.34 12 8 4.89 3.45 12 9 2.34 0.00 12 10 1.73 0.00 12 end * Display the example data list, sepby(election_id) * Calculate disproportionality indices elecdisp vote_share seat_share election_id, inputscale(percentage) outputscale(percentage) * Display the stored results return list