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

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 or gwcode1) and the second state (i.e. ccode2 or gwcode2) 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øw, Valeriya Mechkova, Johannes von Römer, Aksel Sundtröm, Eitan Tzelgov, Luca Uberti, Yi-ting Wang, Tore Wig, and Daniel Ziblatt. 2020. ”V-Dem Codebook v10” 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). doi: 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.

Author

Steven V. Miller

Examples

# just call `library(tidyverse)` at the top of the your script library(magrittr) cow_ddy %>% add_democracy()
#> # A tibble: 2,063,670 x 9 #> ccode1 ccode2 year v2x_polyarchy1 polity21 xm_qudsest1 v2x_polyarchy2 #> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 2 20 1920 0.446 10 1.19 0.442 #> 2 2 20 1921 0.509 10 1.19 0.576 #> 3 2 20 1922 0.51 10 1.19 0.622 #> 4 2 20 1923 0.516 10 1.19 0.622 #> 5 2 20 1924 0.514 10 1.20 0.622 #> 6 2 20 1925 0.505 10 1.20 0.622 #> 7 2 20 1926 0.511 10 1.20 0.661 #> 8 2 20 1927 0.53 10 1.20 0.672 #> 9 2 20 1928 0.533 10 1.25 0.672 #> 10 2 20 1929 0.549 10 1.25 0.672 #> # … with 2,063,660 more rows, and 2 more variables: polity22 <dbl>, #> # xm_qudsest2 <dbl>
create_stateyears(system="gw") %>% add_democracy()
#> Joining, by = c("gwcode", "year")
#> # A tibble: 18,289 x 6 #> gwcode statename year v2x_polyarchy polity2 xm_qudsest #> <dbl> <chr> <dbl> <dbl> <dbl> <dbl> #> 1 2 United States of America 1816 0.367 9 0.707 #> 2 2 United States of America 1817 0.37 9 0.707 #> 3 2 United States of America 1818 0.365 9 0.707 #> 4 2 United States of America 1819 0.362 9 0.707 #> 5 2 United States of America 1820 0.349 9 0.707 #> 6 2 United States of America 1821 0.336 9 0.707 #> 7 2 United States of America 1822 0.341 9 0.707 #> 8 2 United States of America 1823 0.345 9 0.707 #> 9 2 United States of America 1824 0.345 9 0.707 #> 10 2 United States of America 1825 0.341 9 0.707 #> # … with 18,279 more rows
create_stateyears(system="cow") %>% add_democracy()
#> Joining, by = c("ccode", "year")
#> # A tibble: 16,731 x 6 #> ccode statenme year v2x_polyarchy polity2 xm_qudsest #> <dbl> <chr> <dbl> <dbl> <dbl> <dbl> #> 1 2 United States of America 1816 0.367 9 0.707 #> 2 2 United States of America 1817 0.37 9 0.707 #> 3 2 United States of America 1818 0.365 9 0.707 #> 4 2 United States of America 1819 0.362 9 0.707 #> 5 2 United States of America 1820 0.349 9 0.707 #> 6 2 United States of America 1821 0.336 9 0.707 #> 7 2 United States of America 1822 0.341 9 0.707 #> 8 2 United States of America 1823 0.345 9 0.707 #> 9 2 United States of America 1824 0.345 9 0.707 #> 10 2 United States of America 1825 0.341 9 0.707 #> # … with 16,721 more rows