add_cow_majors() allows you to add Correlates of War major power variables to a dyad-year or state-year data frame.

add_cow_majors(data)

Arguments

data

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

Value

add_cow_majors() takes a dyad-year data frame or state-year data frame and adds information about major power status for the given state or dyad in that year. If the data are dyad-year, the function returns two columns for whether the first state (i.e. ccode1) or the second state (i.e. ccode2) are major powers in the given year, according to the Correlates of War. 1 = is a major power. 0 = is not a major power. If the data are state-year, the functions returns just one column (cowmaj) for whether the state was a major power in a given dyad-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

Correlates of War Project. 2017. "State System Membership List, v2016." Online, https://correlatesofwar.org/data-sets/state-system-membership

Author

Steven V. Miller

Examples

# just call `library(tidyverse)` at the top of the your script library(magrittr) cow_ddy %>% add_cow_majors()
#> # A tibble: 2,063,670 x 5 #> ccode1 ccode2 year cowmaj1 cowmaj2 #> <dbl> <dbl> <int> <dbl> <dbl> #> 1 2 20 1920 1 0 #> 2 2 20 1921 1 0 #> 3 2 20 1922 1 0 #> 4 2 20 1923 1 0 #> 5 2 20 1924 1 0 #> 6 2 20 1925 1 0 #> 7 2 20 1926 1 0 #> 8 2 20 1927 1 0 #> 9 2 20 1928 1 0 #> 10 2 20 1929 1 0 #> # … with 2,063,660 more rows