enp: Effective Number of Parties

Description Usage Arguments Examples

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

1
enp(esapsObject, summary = FALSE)

Arguments

esapsObject

An esaps class object. Function: esaps_object.

summary

Summary of the data by country, by default it is FALSE.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
votes <- list(data.frame(country = rep("ARG", 3),
                         year = c(1995, 2000, 2005),
                         party_A = c(40,10,20),
                         party_B = c(35,20,40),
                         party_C = c(25,70,40)),
              data.frame(country = rep("URY", 4),
                         year = c(1995, 2000, 2005, 2010),
                         party_A = c(30,30,20,20),
                         party_B = c(30,50,40, 30),
                         party_C = c(30,10,30, 25),
                         party_D = c(10,10,10,25)),
              data.frame(country = rep("BRA", 2),
                         year = c(1993, 1998),
                         party_A = c(30, 55),
                         party_B = c(70, 45)))

votes <- esaps_object(dataset = votes, name.country = "country", name.year = "year")
en_party <- enp(votes, summary = TRUE)

Nicolas-Schmidt/old_esaps documentation built on May 17, 2019, 3:13 a.m.