Learn R Programming

peacesciencer (version 0.4.0)

add_democracy: Add democracy information to dyad-year or state-year data.

Description

add_democracy() allows you to add estimates of democracy to either dyad-year or state-year data.

Usage

add_democracy(data)

Arguments

data

a dyad-year data frame (either "directed" or "non-directed") or a state-year data frame.

Value

add_democracy() takes a dyad-year data frame or state-year data frame and adds information about the level of democracy for the state or two states in the dyad in a given year. If the data are dyad-year, the function adds six total columns for the first state (i.e. ccode1) and the second state (i.e. ccode2) about the level of democracy measured by the Varieties of Democracy project (v2x_polyarchy), the Polity project (polity2), and Xavier Marquez' QuickUDS extensions/estimates. If the data are state-year, the function returns three additional columns to the original data that contain that same information for a given state in a given year.

Details

The function leans on attributes of the data that are provided by the create_dyadyear() or create_stateyear() function. Make sure that function (or data created by that function) appear at the top of the proverbial pipe.

References

Coppedge, Michael, John Gerring, Carl Henrik Knutsen, Staffan I. Lindberg, Jan Teorell, David Altman, Michael Bernhard, M. Steven Fish, Adam Glynn, Allen Hicken, Anna Luhrmann, Kyle L. Marquardt, Kelly McMann, Pamela Paxton, Daniel Pemstein, Brigitte Seim, Rachel Sigman, Svend-Erik Skaaning, Jeffrey Staton, Agnes Cornell, Lisa Gastaldi, Haakon Gjerl<U+00F8>w, Valeriya Mechkova, Johannes von R<U+00F6>mer, Aksel Sundtr<U+00F6>m, Eitan Tzelgov, Luca Uberti, Yi-ting Wang, Tore Wig, and Daniel Ziblatt. 2020. <U+201D>V-Dem Codebook v10<U+201D> Varieties of Democracy (V-Dem) Project.

Marshall, Monty G., Ted Robert Gurr, and Keith Jaggers. 2017. "Polity IV Project: Political Regime Characteristics and Transitions, 1800-2017." Center for Systemic Peace.

Marquez, Xavier, "A Quick Method for Extending the Unified Democracy Scores" (March 23, 2016). 10.2139/ssrn.2753830

Pemstein, Daniel, Stephen Meserve, and James Melton. 2010. Democratic Compromise: A Latent Variable Analysis of Ten Measures of Regime Type. Political Analysis 18 (4): 426-449.

Examples

Run this code
# NOT RUN {
# just call `library(tidyverse)` at the top of the your script
library(magrittr)

cow_ddy %>% add_democracy()

create_stateyears() %>% add_democracy()


# }

Run the code above in your browser using DataLab