Outcomes after civil war in countries with and without United Nations peacekeeping. See Chapter 1 in Regression and Other Stories.


Load packages

library("rprojroot")
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("foreign")

Load data

peace <- read.dta(root("Peacekeeping/data","pk&pkept_old.dta"))

What percentage of countries had returned to civil wars:

censored <- peace$morewar==0
badness <- log(peace$hazard1)
peacekeepers <- peace$pk_dum==1
cfdate <- peace$cfdate
faildate <- peace$faildate
faildate[is.na(faildate)&!is.na(cfdate)] <- "2004-12-31"
delay <- (as.numeric(faildate) - as.numeric(cfdate))/365.24
ok <- peace$pcw==1 & !is.na(delay)
##ok <- cease_fire & !is.na(badness) & peace$t0 > 1979-12-31 & peace$pcw==1

print(sum(ok))
[1] 96
print(mean(censored[ok]))
[1] 0.4166667
print(unique(peace[ok,3]))
 [1] "Afghanistan-Mujahideen" "Afghanistan-Taliban"    "Algeria-FIS/AIS"       
 [4] "Angola"                 "Azerbaijan-N.K."        "Bangladesh-CHT"        
 [7] "Myanmar-Karen"          "Myanmar-Kachin"         "Cambodia"              
[10] "Central African Rep."   "Chad"                   "Congo Brazzaville"     
[13] "Congo-Brazzaville"      "CongoD.R./Zaire"        "Djibouti"              
[16] "Egypt"                  "El Salvador"            "Ethiopia-Eritrea"      
[19] "Ethiopia-ideology"      "Georgia-Abkhazia"       "Georgia-Ossetia"       
[22] "Guatemala"              "Guinea-Bissau"          "Haiti"                 
[25] "India-Assam"            "India-Sikh"             "Indonesia-Aceh"        
[28] "Indonesia-E. Timor"     "Iraq-Kurds"             "Iraq-Shia"             
[31] "Israel-Palestinians"    "Lebanon"                "Liberia"               
[34] "Mali"                   "Moldova"                "Morocco/WestSah"       
[37] "Mozambique"             "Namibia"                "Nicaragua"             
[40] "U.K.-N. Ireland"        "Pakistan-Mohajirs"      "Papua New Guinea"      
[43] "Peru"                   "Philippines-Communists" "Philippines-Mindanao"  
[46] "Romania"                "Russia-Chechnya"        "Rwanda"                
[49] "Senegal"                "Sierra Leone"           "Somalia"               
[52] "South Africa"           "Sri Lanka (Tamil)"      "Sri Lanka (JVP II)"    
[55] "Sudan"                  "Tajikistan"             "Turkey-Kurds"          
[58] "Uganda-Kony"            "Uganda-LRA"             "Yemen"                 
[61] "Bosnia"                 "Yugoslavia-Croatia"     "Croatia"               
[64] "Yugoslavia-Kosovo"     
print(mean(censored[ok & peacekeepers]))
[1] 0.5588235
print(mean(censored[ok & !peacekeepers]))
[1] 0.3387097
print(mean(delay[ok & !censored & peacekeepers]))
[1] 1.381375
print(mean(delay[ok & !censored & !peacekeepers]))
[1] 1.515742
print(median(delay[ok & !censored & peacekeepers]))
[1] 1.054101
print(median(delay[ok & !censored & !peacekeepers]))
[1] 0.588654

Plot

par(mfrow=c(1,2), mar=c(3,5,3,0), mgp=c(1.5,.5,0), tck=-.01)
subset <- ok & peacekeepers
hist(delay[subset & !censored], xlim=c(0,8), breaks=seq(0,8,.5), xlab="Years until return of war", ylab="", main=paste("With peacekeeping:  ", round(100*mean(censored[subset])), "% of countries stayed at peace.\nFor others, histogram of time until civil war returned:", sep=""), cex.main=.9, cex.axis=.9, cex.lab=.9)
subset <- ok & !peacekeepers
hist(delay[subset & !censored], xlim=c(0,8), breaks=seq(0,8,.5), xlab="Years until return of war", ylab="", main=paste("Without peacekeeping:  ", round(100*mean(censored[subset])), "% stayed at peace.\nFor others, histogram of time until civil war returned:", sep=""), cex.main=.9, cex.axis=.9, cex.lab=.9)

ok2 <- ok & !is.na(badness)
badness2 <- badness/2 + 8
par(mar=c(3,4,2,0), tck=-.01, mgp=c(1.7,.5,0))
plot(badness2[ok2], delay[ok2], type="n", xlab="Pre-treatment measure of problems with the country", ylab="Delay (in years) before return of conflict\n(open circles indicate conflict has not yet returned)", bty="n", xaxt="n")
axis(1, quantile(badness2[ok2], c(.05, .95)), c("not so bad", "really bad"))
axis(1, range(badness2[ok2]), c("",""), tck=0)
points(badness2[ok2&peacekeepers&!censored], delay[ok2&peacekeepers&!censored], col="red", pch=20, cex=.9) # dot
points(badness2[ok2&!peacekeepers&!censored], delay[ok2&!peacekeepers&!censored], col="black", pch=20, cex=.9) # dot
points(badness2[ok2&peacekeepers&censored], delay[ok2&peacekeepers&censored], col="red", pch=21) # circle
points(badness2[ok2&!peacekeepers&censored], delay[ok2&!peacekeepers&censored], col="black", pch=21) # circle
mtext("Peacekeeping (red) is associated with slightly longer periods without war", line=1)

par(mfrow=c(1,2), mar=c(3,4,2,0), tck=-.01, mgp=c(1.7,.5,0))
ok2a <- ok&peacekeepers
plot(badness2[ok2], delay[ok2], type="n", xlab="Pre-treatment measure of problems with the country", ylab="Delay (in years) before return of conflict\n(open circles where conflict did not return)", bty="n", xaxt="n")
axis(1, quantile(badness2[ok2], c(.05, .95)), c("not so bad", "really bad"))
axis(1, range(badness2[ok2]), c("",""), tck=0)
points(badness2[ok2a&peacekeepers&!censored], delay[ok2a&peacekeepers&!censored], col="black", pch=20, cex=.6) # dot
points(badness2[ok2a&peacekeepers&censored], delay[ok2a&peacekeepers&censored], col="black", pch=1, cex=1.1) # circle
mtext("With U.N. peacekeeping", line=1, cex=1.1)
ok2b <- ok&!peacekeepers
plot(badness2[ok2], delay[ok2], type="n", xlab="Pre-treatment measure of problems with the country", ylab="", bty="n", xaxt="n")
axis(1, quantile(badness2[ok2], c(.05, .95)), c("not so bad", "really bad"))
axis(1, range(badness2[ok2]), c("",""), tck=0)
points(badness2[ok2b&!peacekeepers&!censored], delay[ok2b&!peacekeepers&!censored], col="black", pch=20, cex=.6) # dot
points(badness2[ok2b&!peacekeepers&censored], delay[ok2b&!peacekeepers&censored], col="black", pch=1, cex=1.1) # circle
mtext("Without U.N. peacekeeping", line=1, cex=1.1)


log.delay <- log(delay)
plot (badness[ok], log.delay[ok], type="n", xlab="badness", ylab="delay")
points (badness[ok&peacekeepers], log.delay[ok&peacekeepers], pch=21) # circle
points (badness[ok&!peacekeepers], log.delay[ok&!peacekeepers], pch=20) # bullet

sqrt.delay <- sqrt(delay)
plot (badness[ok], sqrt.delay[ok], type="n", xlab="badness", ylab="delay")
points (badness[ok&peacekeepers], sqrt.delay[ok&peacekeepers], pch=21) # circle
points (badness[ok&!peacekeepers], sqrt.delay[ok&!peacekeepers], pch=20) # bullet

table(peacekeepers[ok], censored[ok])
       
        FALSE TRUE
  FALSE    41   21
  TRUE     15   19
par(mfrow=c(2,2))
time <- as.numeric (cfdate)
hist(time[peacekeepers&ok])
hist(time[!peacekeepers&ok])

## minidata <- cbind (cfdate, faildate, peacekeepers, round(badness,2), round(delay,2), censored)[ok,]
## rownames (minidata) <- peace$cname[ok]
## colnames (minidata) <- c ("cfdate", "faildate", "peacekeepers?", "badness", "delay", "censored?")
## write.csv(minidata, "minidata.csv")

LS0tCnRpdGxlOiAiUmVncmVzc2lvbiBhbmQgT3RoZXIgU3RvcmllczogUGVhY2VrZWVwaW5nIgphdXRob3I6ICJBbmRyZXcgR2VsbWFuLCBKZW5uaWZlciBIaWxsLCBBa2kgVmVodGFyaSIKZGF0ZTogImByIGZvcm1hdChTeXMuRGF0ZSgpKWAiCm91dHB1dDoKICBodG1sX2RvY3VtZW50OgogICAgdGhlbWU6IHJlYWRhYmxlCiAgICB0b2M6IHRydWUKICAgIHRvY19kZXB0aDogMgogICAgdG9jX2Zsb2F0OiB0cnVlCiAgICBjb2RlX2Rvd25sb2FkOiB0cnVlCi0tLQpPdXRjb21lcyBhZnRlciBjaXZpbCB3YXIgaW4gY291bnRyaWVzIHdpdGggYW5kIHdpdGhvdXQgVW5pdGVkCk5hdGlvbnMgcGVhY2VrZWVwaW5nLiBTZWUgQ2hhcHRlciAxIGluIFJlZ3Jlc3Npb24gYW5kIE90aGVyClN0b3JpZXMuCgotLS0tLS0tLS0tLS0tCgoKYGBge3Igc2V0dXAsIGluY2x1ZGU9RkFMU0V9CmtuaXRyOjpvcHRzX2NodW5rJHNldChtZXNzYWdlPUZBTFNFLCBlcnJvcj1GQUxTRSwgd2FybmluZz1GQUxTRSwgY29tbWVudD1OQSkKIyBzd2l0Y2ggdGhpcyB0byBUUlVFIHR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