enp {esaps} | R Documentation |
Effective Number of Parties
Description
The Effective Number of Parties (ENP) is an index developed by Laakso and Taagepera (1979) that allows to count the relevant parties in a party system. The formula consists on dividing one over the sum of the squares of the proportions (votes or seats) that the parties obtain in an electoral instance.
Usage
enp(tidy_data, enp_seats = FALSE, summary = FALSE)
Arguments
tidy_data |
data.frame that contains the following variables with these names:
If the data is not structured in this way you can order it with: |
enp_seats |
enp_seats = TRUE allows us to calculate jointly the effective number of electoral parties and in the congress. |
summary |
Summary of the data by unit, by default it is |
Value
if summary = FALSE,
return data.frame.
if summary = TRUE
, return a list with two data.frame.
list[[1]]
Indicatorlist[[2]]
Summarymin
variable 'election'max
variable 'election'number of elections
mean
indicator
Author(s)
Nicolas Schmidt nschmidt@cienciassociales.edu.uy
Examples
votes <- data.frame(election = rep(c(2000, 2005), each = 4),
unit = rep(c("ARG", "URY"), each = 4),
party = c("party_A", "party_B","party_C","party_D"),
votes = c(20, 20, 50, 10, 30, 35, 25, 10),
seats = c(25, 25, 40, 10, 30, 30, 30, 10)
)
enp(votes)
enp(votes, enp_seats = TRUE)
enp(votes, summary = TRUE)