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.

enp(tidy_data, enp_seats = FALSE, summary = FALSE)

Arguments

tidy_data

data.frame that contains the following variables with these names:

  • election: year of election.

  • unit: the unit of analysis (province, department ...)

  • party: name of the political parties that obtain votes.

  • votes: votes obtained by each party.

  • seats: .

If the data is not structured in this way you can order it with: convert_esaps.

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 FALSE.

Value

if summary = FALSE, return data.frame.

if summary = TRUE, return a list with two data.frame.

  • list[[1]] Indicator

  • list[[2]] Summary

    • min variable 'election'

    • max variable 'election'

    • number of elections

    • mean indicator

Author

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)
#> election unit enp #> 1 2000 ARG 2.94 #> 2 2005 URY 3.51
enp(votes, enp_seats = TRUE)
#> election unit enp enp_c #> 1 2000 ARG 2.94 3.39 #> 2 2005 URY 3.51 3.57
enp(votes, summary = TRUE)
#> [[1]] #> election unit enp #> 1 2000 ARG 2.94 #> 2 2005 URY 3.51 #> #> [[2]] #> unit min.election max.election n.election mean_enp sd_enp #> 1 ARG 2000 2000 1 2.94 NA #> 2 URY 2005 2005 1 3.51 NA #>