Title: | Measuring the Power in Voting Systems |
---|---|
Description: | This R package allows the determination of some distributions of the voters' power when passing laws in weighted voting situations. |
Authors: | Livino M. Armijos-Toro [aut, cre], Jose M. Alonso-Meijide [aut], Manuel A. Mosquera [aut], Alejandro Saavedra-Nieves [aut] |
Maintainer: | Livino M. Armijos-Toro <[email protected]> |
License: | GPL-2 |
Version: | 1.6 |
Built: | 2024-11-27 06:47:27 UTC |
Source: | CRAN |
This R package allows the determination of some distributions of the voters' power when passing laws in weighted voting situations.
The DESCRIPTION file:
Package: | powerindexR |
Type: | Package |
Title: | Measuring the Power in Voting Systems |
Version: | 1.6 |
Date: | 2024-05-30 |
Authors@R: | c(person("Livino M.", "Armijos-Toro", role = c("aut", "cre"),email="[email protected]"), person("Jose M.", "Alonso-Meijide", role = c("aut")), person("Manuel A.", "Mosquera", role = c("aut")), person("Alejandro", "Saavedra-Nieves", role = c("aut"))) |
Depends: | R(>= 3.0.0) |
Description: | This R package allows the determination of some distributions of the voters' power when passing laws in weighted voting situations. |
License: | GPL-2 |
LazyLoad: | yes |
Packaged: | 2024-05-30 14:57:11 UTC; alexs |
Repository: | CRAN |
NeedsCompilation: | no |
Author: | Livino M. Armijos-Toro [aut, cre], Jose M. Alonso-Meijide [aut], Manuel A. Mosquera [aut], Alejandro Saavedra-Nieves [aut] |
Maintainer: | Livino M. Armijos-Toro <[email protected]> |
RoxygenNote: | 7.0.2 |
Date/Publication: | 2024-05-30 15:10:03 UTC |
Index of help topics:
MWC Obtain the minimal winning coalitions QMWC Obtain the quasi-minimal winning coalitions pi.banzhaf Power based on the Banzhaf index. pi.colomermartinez Power based on the Colomer-Martinez index. pi.johnston Power based on the Johnston index. pi.johnstoncolomermartinez Power based on the Jonhston-Colomer-Martinez index. pi.shapley Power based on the Shapley-Shubik index. powerindex Obtain several measures of power powerindexR-package Measuring the Power in Voting Systems
This R package allows the determination of some distributions of the voters' power when passing laws in weighted voting situations.
Livino M. Armijos-Toro, Jose M. Alonso-Meijide, Manuel A. Mosquera, Alejandro Saavedra-Nieves.
Alonso-Meijide, J. M., & Bowles, C. (2005). Generating functions for coalitional power indices: An application to the IMF. Annals of Operations Research, 137, 21-44. <https://doi.org/10.1007/s10479-005-2242-y>.
Brams, S. J., & Affuso, P. J. (1976). Power and size: A new paradox. Theory and Decision, 7(1-2), 29-56. <https://doi.org/10.1007/BF00141101>.
Colomer, J. M., & Martinez, F. (1995). The paradox of coalition trading. Journal of Theoretical Politics, 7(1), 41-63. <https://doi.org/10.1177/0951692895007001003>.
Johnston, R. J. (1978). On the measurement of power: Some reactions to Laver. Environment and Planning A, 10(8), 907-914. <https://doi.org/10.1068/a100907>.
Lucas, W. F. (1983). Measuring power in weighted voting systems (pp. 183-238). Springer New York. <https://doi.org/10.1007/978-1-4612-5430-0_9>
This function determines the minimal winning coalitions in a weighted majority game.
MWC(quota, weights)
MWC(quota, weights)
quota |
Numerical value that represents the majority in a given voting. |
weights |
Numerical vector of dimension |
Number of Minimal Winning Coalitions |
Total amount of Minimal Winning Coalitions. |
Minimal Winning Coalitions |
Each row indicates a binary representation of each Minimal Winning Coalition. |
Livino M. Armijos-Toro, Jose M. Alonso-Meijide, Manuel A. Mosquera, Alejandro Saavedra-Nieves.
weights<-c(137,85,71,32,9,8,5,2,1) quota<-176 MWC(quota,weights)
weights<-c(137,85,71,32,9,8,5,2,1) quota<-176 MWC(quota,weights)
This function determines the distribution of the power based on the Banzhaf index and the Banzaf-Owen value.
pi.banzhaf(quota, weights, partition = NULL, normalized = FALSE, swing = FALSE)
pi.banzhaf(quota, weights, partition = NULL, normalized = FALSE, swing = FALSE)
quota |
Numerical value that represents the majority in a given voting. |
weights |
Numerical vector of dimension |
partition |
Numerical vector that indicates the partition of voters. Each component indicates the element of the partition to which such voter belongs. If it is not |
normalized |
Logical option to obtain the normalized Banzhaf values. |
swing |
Logical option to obtain the number of swings of each voter. |
Banzhaf value |
The Banzhaf value, if |
Banzhaf-Owen value |
The Banzhaf-Owen value, if |
Livino M. Armijos-Toro, Jose M. Alonso-Meijide, Manuel A. Mosquera, Alejandro Saavedra-Nieves.
Alonso-Meijide, J. M., & Bowles, C. (2005). Generating functions for coalitional power indices: An application to the IMF. Annals of Operations Research, 137, 21-44.
Brams, S. J., & Affuso, P. J. (1976). Power and size: A new paradox. Theory and Decision, 7(1-2), 29-56.
# Example Banzhaf value weights<-c(137,85,71,32,9,8,5,2,1) quota<-176 pi.banzhaf(quota,weights) pi.banzhaf(quota,weights,normalized=TRUE) # Example Banzhaf-Owen value quota<-30 weights<-c(28, 16, 5, 4, 3, 3) # Partition={{1},{2,4,6},{3,5}} pi.banzhaf(quota,weights,partition=c(1,2,3,2,3,2))
# Example Banzhaf value weights<-c(137,85,71,32,9,8,5,2,1) quota<-176 pi.banzhaf(quota,weights) pi.banzhaf(quota,weights,normalized=TRUE) # Example Banzhaf-Owen value quota<-30 weights<-c(28, 16, 5, 4, 3, 3) # Partition={{1},{2,4,6},{3,5}} pi.banzhaf(quota,weights,partition=c(1,2,3,2,3,2))
This function determines the distribution of the power based on the Colomer-Martinez index.
pi.colomermartinez(quota, weights, minimal = FALSE)
pi.colomermartinez(quota, weights, minimal = FALSE)
quota |
Numerical value that represents the majority in a given voting. |
weights |
Numerical vector of dimension |
minimal |
Logical option to obtain the Minimal Winning Coalitions. |
Colomer-Martinez |
The Colomer-Martinez index. |
Number of Minimal Winning Coalitions |
Total amount of Minimal Winning Coalitions. |
Minimal Winning Coalitions |
Each row indicates a binary representation of each Minimal Winning Coalition. |
Livino M. Armijos-Toro, Jose M. Alonso-Meijide, Manuel A. Mosquera, Alejandro Saavedra-Nieves.
Colomer, J. M., & Martinez, F. (1995). The paradox of coalition trading. Journal of Theoretical Politics, 7(1), 41-63.
weights<-c(137,85,71,32,9,8,5,2,1) quota<-176 pi.colomermartinez(176,weights,minimal=TRUE)
weights<-c(137,85,71,32,9,8,5,2,1) quota<-176 pi.colomermartinez(176,weights,minimal=TRUE)
This function determines the distribution of the power based on the Johnston index.
pi.johnston(quota, weights, quasiminimal = FALSE)
pi.johnston(quota, weights, quasiminimal = FALSE)
quota |
Numerical value that represents the majority in a given voting. |
weights |
Numerical vector of dimension |
quasiminimal |
Logical option to obtain the Quasi-Minimal Winning Coalitions. |
Johnston |
The Jonhston index. |
Number of Quasi-Minimal Winning Coalitions |
Total amount of Quasi-Minimal Winning Coalitions. |
Quasi-Minimal Winning Coalitions |
Each row indicates a binary representation of each Quasi-Minimal Winning Coalition. |
Livino M. Armijos-Toro, Jose M. Alonso-Meijide, Manuel A. Mosquera, Alejandro Saavedra-Nieves.
Johnston, R. J. (1978). On the measurement of power: Some reactions to Laver. Environment and Planning A, 10(8), 907-914.
weights<-c(137,85,71,32,9,8,5,2,1) quota<-176 pi.johnston(176,weights,quasiminimal=TRUE)
weights<-c(137,85,71,32,9,8,5,2,1) quota<-176 pi.johnston(176,weights,quasiminimal=TRUE)
This function determines the distribution of the power based on the Jonhston-Colomer-Martinez index.
pi.johnstoncolomermartinez(quota, weights)
pi.johnstoncolomermartinez(quota, weights)
quota |
Numerical value that represents the majority in a given voting. |
weights |
Numerical vector of dimension |
Jonhston-Colomer-Martinez |
The Jonhston-Colomer-Martinez index. |
Livino M. Armijos-Toro, Jose M. Alonso-Meijide, Manuel A. Mosquera, Alejandro Saavedra-Nieves.
Colomer, J. M., & Martinez, F. (1995). The paradox of coalition trading. Journal of Theoretical Politics, 7(1), 41-63.
Johnston, R. J. (1978). On the measurement of power: Some reactions to Laver. Environment and Planning A, 10(8), 907-914.
weights<-c(137,85,71,32,9,8,5,2,1) quota<-176 pi.johnstoncolomermartinez(176,weights)
weights<-c(137,85,71,32,9,8,5,2,1) quota<-176 pi.johnstoncolomermartinez(176,weights)
This function determines the distribution of the power based on the Shapley-Shubik index and the Owen value.
pi.shapley(quota, weights, partition = NULL)
pi.shapley(quota, weights, partition = NULL)
quota |
Numerical value that represents the majority in a given voting. |
weights |
Numerical vector of dimension |
partition |
Numerical vector that indicates the partition of voters. Each component indicates the element of the partition to which such voter belongs. If it is not |
Shapley value |
The Shapley value, if |
Owen value |
The Owen value, if |
Livino M. Armijos-Toro, Jose M. Alonso-Meijide, Manuel A. Mosquera, Alejandro Saavedra-Nieves.
Alonso-Meijide, J. M., & Bowles, C. (2005). Generating functions for coalitional power indices: An application to the IMF. Annals of Operations Research, 137, 21-44.
Lucas, W. F. (1983). Measuring power in weighted voting systems (pp. 183-238). Springer New York.
# Example Shapley value weights<-c(137,85,71,32,9,8,5,2,1) quota<-176 pi.shapley(quota,weights) # Example Owen value quota<-30 weights<-c(28, 16, 5, 4, 3, 3) # Partition={{1},{2,4,6},{3,5}} pi.shapley(quota,weights,partition=c(1,2,3,2,3,2))
# Example Shapley value weights<-c(137,85,71,32,9,8,5,2,1) quota<-176 pi.shapley(quota,weights) # Example Owen value quota<-30 weights<-c(28, 16, 5, 4, 3, 3) # Partition={{1},{2,4,6},{3,5}} pi.shapley(quota,weights,partition=c(1,2,3,2,3,2))
This general function allows the determination of several distributions of the power under different approaches in a weighted voting situation.
powerindex(quota, weights, index = c("S", "B", "J", "CM", "JCM"), partition = NULL, quasiminimal = FALSE, minimal = FALSE, normalized = FALSE, swing = FALSE)
powerindex(quota, weights, index = c("S", "B", "J", "CM", "JCM"), partition = NULL, quasiminimal = FALSE, minimal = FALSE, normalized = FALSE, swing = FALSE)
quota |
Numerical value that represents the majority in a given voting. |
weights |
Numerical vector of dimension |
index |
Character that indicates the used approach. |
partition |
Numerical vector that indicates the partition of voters. Each component indicates the element of the partition to which such voter belongs. |
quasiminimal |
Logical option to obtain the Quasi-Minimal Winning Coalitions. |
minimal |
Logical option to obtain the Minimal Winning Coalitions. |
normalized |
Logical option to obtain the normalized Banzhaf values. |
swing |
Logical option to obtain the number of swings of each voter. |
See the values of the respective functions.
Livino M. Armijos-Toro, Jose M. Alonso-Meijide, Manuel A. Mosquera, Alejandro Saavedra-Nieves.
Alonso-Meijide, J. M., & Bowles, C. (2005). Generating functions for coalitional power indices: An application to the IMF. Annals of Operations Research, 137, 21-44.
Brams, S. J., & Affuso, P. J. (1976). Power and size: A new paradox. Theory and Decision, 7(1-2), 29-56.
Colomer, J. M., & Martinez, F. (1995). The paradox of coalition trading. Journal of Theoretical Politics, 7(1), 41-63.
Johnston, R. J. (1978). On the measurement of power: Some reactions to Laver. Environment and Planning A, 10(8), 907-914.
Lucas, W. F. (1983). Measuring power in weighted voting systems (pp. 183-238). Springer New York.
weights<-c(137,85,71,32,9,8,5,2,1) quota<-176 powerindex(quota,weights,index="S") powerindex(quota,weights,index="B",swing=TRUE) powerindex(quota,weights,index="B",partition=c(1,1,2,2,3,3,4,4,4),swing=TRUE) powerindex(quota,weights,index="J",quasiminimal=TRUE)
weights<-c(137,85,71,32,9,8,5,2,1) quota<-176 powerindex(quota,weights,index="S") powerindex(quota,weights,index="B",swing=TRUE) powerindex(quota,weights,index="B",partition=c(1,1,2,2,3,3,4,4,4),swing=TRUE) powerindex(quota,weights,index="J",quasiminimal=TRUE)
This function determines the quasi-minimal winning coalitions in a weighted majority game.
QMWC(quota, weights)
QMWC(quota, weights)
quota |
Numerical value that represents the majority in a given voting. |
weights |
Numerical vector of dimension |
Number of Quasi-Minimal Winning Coalitions |
Total amount of Quasi-Minimal Winning Coalitions. |
Quasi-Minimal Winning Coalitions |
Each row indicates a binary representation of each Quasi-Minimal Winning Coalition. |
Livino M. Armijos-Toro, Jose M. Alonso-Meijide, Manuel A. Mosquera, Alejandro Saavedra-Nieves.
weights<-c(137,85,71,32,9,8,5,2,1) quota<-176 QMWC(quota,weights)
weights<-c(137,85,71,32,9,8,5,2,1) quota<-176 QMWC(quota,weights)