nationalization: Nationalization

Description Usage Arguments Author(s)

View source: R/nationalization-source.R

Description

This function creates and populates datasets of party nationalization measures, using CLEA data with output at the national-level, party-level, and the constituency-level.

Usage

1
2
3
4
5
6
7
8
nationalization(
  dataSource,
  dataFormat,
  outputFolder,
  inequalityType = "Gini",
  CandidateOrPartyBased = "party.based",
  filterSmallParties = FALSE
)

Arguments

dataSource

Character string of the location of the CLEA data to be used for nationalization measure generation.

dataFormat

Format of the data file being read. Acceptable formats are the following: ".csv",".xlsx",".rdata", or ".dta"

outputFolder

Character string of the location where the user desires the output files to be written on their local machine. Note that four files will be generated at the end of this script (i.e., party-level, national-level, constituency-level, and Gini inequality measures).

inequalityType

Optional argument, which defaults to "Gini" to compute Gini measures of inequality. Other options are available (i.e., "RS","Atkinson","Theil","Kolm", "var","square.var","entropy"), but "Gini" is highly recommended.

CandidateOrPartyBased

Optional argument, which defaults to "party.based"; this argument accepts only "party.based" or "candidate.based", which allows the user to proxy candidate votes/candidate shares for party votes/party shares. This is indended for the advanced user, and "party.based" is highly recomended for accurate measures.

filterSmallParties

Optional argument, which defaults to TRUE. Generally, this package filters out parties that did not achieve at least five percent (5%) of the national vote before computing measures of nationalization. However, the user can opt to maintain all parties in the output.

Author(s)

Simon Page


simongamerpage/nationalization documentation built on Dec. 23, 2021, 2:24 a.m.