Skip to contents

add_cow_wars() allows you to Correlates of War data to a dyad-year or state-year data frame

Usage

add_cow_wars(data, type, intratype = "all")

Arguments

data

a data frame with appropriate peacesciencer attributes

type

the type of war you want to add. Options include "inter" or "intra".

intratype

the types of armed conflicts the user wants to consider, specified as a character vector. Options include "local issues" and "central control". Applicable only if type is "intra".

Value

add_cow_wars() takes a dyad-year or state-year data frame and returns information about wars from either the inter-state or intra-state war data set from the Correlates of War. The function works for state-year data when the user wants information about extra-state wars or intra-state wars. The function works for dyad-year data when the user wants information about inter-state wars.

Details

Intra-state war data are coerced into true state-year data by first selecting the duplicate state-years on unique onsets, then whichever war was the deadliest. The inter-state war data work functionally the same way.

On intra-state wars: the primary_state is used to identify the government principally fighting the domestic non-state actor over central control over local issues. Internationalized civil wars are included in the data, but not for outside actors that intervene on behalf of the government or rebel group.

Extra-state war functionality is not available right now as I try to figure out the demand for its use.

References

Dixon, Jeffrey, and Meredith Sarkees. 2016. A Guide to Intra-State Wars: An Examination of Civil Wars, 1816-2014. Thousand Oaks, CA: Sage.

Sarkees, Meredith Reid, and Frank Wheldon Wayman. 2010. Resort to War: A Data Guide to Inter-State, Extra-State, Intra-State, and Non-State Wars, 1816-2007. Washington DC: CQ Press.

Author

Steven V. Miller

Examples


# \donttest{
# just call `library(tidyverse)` at the top of the your script
library(magrittr)

create_stateyears(system = "cow") %>%
add_cow_wars(type = "intra", intratype = "central control")
#> Joining with `by = join_by(ccode, year)`
#> # A tibble: 17,121 × 13
#>    ccode statenme      year warnum warname wartype cowintraonset cowintraongoing
#>    <dbl> <chr>        <int>  <dbl> <chr>   <chr>           <dbl>           <dbl>
#>  1     2 United Stat…  1816     NA NA      NA                  0               0
#>  2     2 United Stat…  1817     NA NA      NA                  0               0
#>  3     2 United Stat…  1818     NA NA      NA                  0               0
#>  4     2 United Stat…  1819     NA NA      NA                  0               0
#>  5     2 United Stat…  1820     NA NA      NA                  0               0
#>  6     2 United Stat…  1821     NA NA      NA                  0               0
#>  7     2 United Stat…  1822     NA NA      NA                  0               0
#>  8     2 United Stat…  1823     NA NA      NA                  0               0
#>  9     2 United Stat…  1824     NA NA      NA                  0               0
#> 10     2 United Stat…  1825     NA NA      NA                  0               0
#> # ℹ 17,111 more rows
#> # ℹ 5 more variables: intnl <dbl>, outcome <dbl>, sideadeaths <dbl>,
#> #   sidebdeaths <dbl>, intrawarnums <chr>

create_stateyears(system = "cow") %>%
add_cow_wars(type = "intra", intratype = "local issues")
#> Joining with `by = join_by(ccode, year)`
#> # A tibble: 17,121 × 13
#>    ccode statenme      year warnum warname wartype cowintraonset cowintraongoing
#>    <dbl> <chr>        <int>  <dbl> <chr>   <chr>           <dbl>           <dbl>
#>  1     2 United Stat…  1816     NA NA      NA                  0               0
#>  2     2 United Stat…  1817     NA NA      NA                  0               0
#>  3     2 United Stat…  1818     NA NA      NA                  0               0
#>  4     2 United Stat…  1819     NA NA      NA                  0               0
#>  5     2 United Stat…  1820     NA NA      NA                  0               0
#>  6     2 United Stat…  1821     NA NA      NA                  0               0
#>  7     2 United Stat…  1822     NA NA      NA                  0               0
#>  8     2 United Stat…  1823     NA NA      NA                  0               0
#>  9     2 United Stat…  1824     NA NA      NA                  0               0
#> 10     2 United Stat…  1825     NA NA      NA                  0               0
#> # ℹ 17,111 more rows
#> # ℹ 5 more variables: intnl <dbl>, outcome <dbl>, sideadeaths <dbl>,
#> #   sidebdeaths <dbl>, intrawarnums <chr>

cow_ddy %>% add_cow_wars(type = "inter")
#> Joining with `by = join_by(ccode1, ccode2, year)`
#> # A tibble: 2,139,270 × 14
#>    ccode1 ccode2  year cowinterongoing cowinteronset sidea1 sidea2 initiator1
#>     <dbl>  <dbl> <dbl>           <dbl>         <dbl>  <dbl>  <dbl>      <dbl>
#>  1      2     20  1920               0             0     NA     NA         NA
#>  2      2     20  1921               0             0     NA     NA         NA
#>  3      2     20  1922               0             0     NA     NA         NA
#>  4      2     20  1923               0             0     NA     NA         NA
#>  5      2     20  1924               0             0     NA     NA         NA
#>  6      2     20  1925               0             0     NA     NA         NA
#>  7      2     20  1926               0             0     NA     NA         NA
#>  8      2     20  1927               0             0     NA     NA         NA
#>  9      2     20  1928               0             0     NA     NA         NA
#> 10      2     20  1929               0             0     NA     NA         NA
#> # ℹ 2,139,260 more rows
#> # ℹ 6 more variables: initiator2 <dbl>, outcome1 <dbl>, outcome2 <dbl>,
#> #   batdeath1 <dbl>, batdeath2 <dbl>, resume <dbl>
# }