calc_nep: calc_nep

Description Usage Arguments Value Examples

View source: R/calc_nep.R

Description

Calculates the effective number of parties (ENP, seats or votes), according to two different formulae.

Usage

1
calc_nep(prop_votes, index = "lt")

Arguments

prop_votes

A vector of party vote proportions.

index

Formula for the index. Can be either "lt" for Laakso-Taagepera (1979) or "g" for Golosov (2010).

Value

A vector of length 1 with the ENP index.

Examples

1
2
3
4
5
data(camara)
camara %>%
    group_by(congress) %>%
    summarize(nep_lt = calc_nep(prop_votes),
              nep_g = calc_nep(prop_votes, index = "g"))

josefortou/fortour documentation built on Aug. 6, 2020, 8:13 p.m.