svmiller / peacesciencer

Tools and Data for Quantitative Peace Science
http://svmiller.com/peacesciencer
GNU General Public License v2.0
25 stars 3 forks source link

Problem with UCDP Armed Conflict Data Merge #14

Closed rudloffprof closed 1 year ago

rudloffprof commented 1 year ago

An example:

library(preacesciencr)
test <- create_stateyears(system = "gw", subset_years = c(1946:2019))
test <- add_ucdp_acd(test, type = c("intrastate", "II"), issue = "both")
table(test$ucdpongoing)

This results in two state years out of ~10,000 coded as "1" for the ucdpongoing variable: Syria in 2016 and Syria in 2018 (in case this helps with diagnosis).

R version: 4.2.2 peacesciencer version: 1.0.0

I took a brief look at the source code for the add_ucdp_acd() function, and nothing was immediately apparent that would explain why only these two years for Syria would be coded correctly in the resulting data.

svmiller commented 1 year ago

Looking into this now, and this might be a case where I show how little I know or think about the UCDP data, but the "both" in the issue coding is filtering on the raw UCDP ACD data where incompatibility == 3 . Doing that, there are 18 cases and that's in the raw data. Selecting on those 18 cases where type_of_conflict >= 3, you get the two Syrian cases, and that's it.

As a matter of functionality, it looks like add_ucdp_acd() is behaving as it should. If there's a better, more informative way of processing the underlying UCDP ACD data, that could be happening too. Here's where I'll reiterate I'm primarily an inter-state conflict guy. :P

rudloffprof commented 1 year ago

No, you are correct. I was reading issue = "both" as issue = c("territory", "government"), and missing that "both" refers to a logical "and" of both categories per conflict id in the underlying UCDP variable. Closing the issue - sorry for the false alarm!