add_mids() merges in GML's MID data to a dyad-year data frame. The current version of the GML MID data is 2.1.1. The function is depcrecated and replaced by add_gml_mids() to avoid confusion with the other conflict data option (add_cow_mids())

add_mids(data, keep)

Arguments

data

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

keep

an optional parameter, specified as a character vector, passed to the function in a select(one_of(.)) wrapper. This allows the user to discard unwanted columns from the directed dispute data so that the output does not consume too much space in memory. Note: the Correlates of War system codes (ccode1, ccode2), the observation year (year), the presence or absence of an ongoing MID (midongoing), and the presence or absence of a unique MID onset (midonset) are *always* returned. It would be foolish and self-defeating to eliminate those observations. The user is free to keep or discard anything else they see fit.

If keep is not specified in the function, the ensuing output returns everything.

Value

add_mids() takes a dyad-year data frame and adds dyad-year dispute information from the GML MID data.

Details

Dyads are capable of having multiple disputes in a given year, which can create a problem for merging into a complete dyad-year data frame. Consider the case of France and Italy in 1860, which had three separate dispute onsets that year (MID#0112, MID#0113, MID#0306), as illustrative of the problem. This merging process employs the following rules to whittle down these duplicate dispute-year observations. It first selects on MID onsets, then selecting highest fatality level, then highest hostility level, then the longest estimating minimum dispute duration, and finally, in the event of duplicates still outstanding, selecting the MID that came first. This is how GML present their full directed and non-directed dyad-year data.

References

Gibler, Douglas M., Steven V. Miller, and Erin K. Little. 2016. “An Analysis of the Militarized Interstate Dispute (MID) Dataset, 1816-2001.” International Studies Quarterly 60(4): 719-730.

Author

Steven V. Miller

Examples

# \donttest{ # just call `library(tidyverse)` at the top of the your script library(magrittr) cow_ddy %>% add_mids()
#> Warning: 'add_mids' is deprecated. #> Use 'add_gml_mids' instead. #> See help("Deprecated")
#> Joining, by = c("ccode1", "ccode2", "year")
#> # A tibble: 2,063,670 x 39 #> ccode1 ccode2 year dispnum midongoing midonset sidea1 sidea2 revstate1 #> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 2 20 1920 NA 0 0 NA NA NA #> 2 2 20 1921 NA 0 0 NA NA NA #> 3 2 20 1922 NA 0 0 NA NA NA #> 4 2 20 1923 NA 0 0 NA NA NA #> 5 2 20 1924 NA 0 0 NA NA NA #> 6 2 20 1925 NA 0 0 NA NA NA #> 7 2 20 1926 NA 0 0 NA NA NA #> 8 2 20 1927 NA 0 0 NA NA NA #> 9 2 20 1928 NA 0 0 NA NA NA #> 10 2 20 1929 NA 0 0 NA NA NA #> # … with 2,063,660 more rows, and 30 more variables: revstate2 <dbl>, #> # revtype11 <dbl>, revtype12 <dbl>, revtype21 <dbl>, revtype22 <dbl>, #> # fatality1 <dbl>, fatality2 <dbl>, fatalpre1 <dbl>, fatalpre2 <dbl>, #> # hiact1 <dbl>, hiact2 <dbl>, hostlev1 <dbl>, hostlev2 <dbl>, orig1 <dbl>, #> # orig2 <dbl>, hiact <dbl>, hostlev <dbl>, mindur <dbl>, maxdur <dbl>, #> # outcome <dbl>, settle <dbl>, fatality <dbl>, fatalpre <dbl>, stmon <dbl>, #> # endmon <dbl>, recip <dbl>, numa <dbl>, numb <dbl>, ongo2010 <dbl>, #> # version <chr>
# keep just the dispute number and Side A/B identifiers cow_ddy %>% add_mids(keep=c("dispnum","sidea1", "sidea2"))
#> Warning: 'add_mids' is deprecated. #> Use 'add_gml_mids' instead. #> See help("Deprecated")
#> Joining, by = c("ccode1", "ccode2", "year")
#> # A tibble: 2,063,670 x 8 #> ccode1 ccode2 year midonset midongoing dispnum sidea1 sidea2 #> <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 #> # … with 2,063,660 more rows
# }