war: Civil war data

Description Usage Format Source Examples

Description

Civil war data from Fearon and Laitin (2003).

Usage

1

Format

war is a 6326 row data frame with the following columns

onset

equal to 1 for all country-years in which a civil war started.

instab

equal to 1 if unstable government.

oil

equal to 1 for oil exporter country.

warl

equal to 1 if the country had a distinct civil war ongoing in the previous year.

gdpenl

GDP per capita (measured as thousands of 1985 U.S. dollars) lagged one year.

ncontig

equal to 1 for non-contiguous state.

nwstate

equal to 1 for new state.

lpopl

log(population size).

lmtnest

log(mountainous).

ethfrac

measure of ethnic fractionalization (calculated as the probability that two randomly drawn individuals from a country are not from the same ethnicity).

relfrac

measure of religious fractionalization.

polity2l

measure of political democracy (ranges from -10 to 10) lagged one year.

Source

Data are from:

Fearon J.D., Laitin D.D. (2003), Ethnicity, Insurgency, and Civil War. The American Political Science Review, 97, 75-90.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
## Not run:  

#########################################################
#########################################################

library("JRM")

data("war", package = "JRM")        

###################################################
# Bivariate brobit model with partial observability
###################################################  

reb.eq <- onset ~ instab + oil + warl + lpopl + lmtnest + ethfrac +
                  polity2l + s(gdpenl) + s(relfrac) 
gov.eq <- onset ~ instab + oil + warl + ncontig + nwstate + s(gdpenl)   

bpo <- SemiParBIV(list(reb.eq, gov.eq), data = war, Model = "BPO")
conv.check(bpo)

# perhaps model is to complex

set.seed(1)
sbpo <- summary(bpo)
sbpo$theta; sbpo$CItheta

# let's exclude the correlation parameter in fitting

bpo0 <- SemiParBIV(list(reb.eq, gov.eq), data = war, Model = "BPO0")
conv.check(bpo0)

summary(bpo0)


war.eq <- onset ~ instab + oil + warl +  ncontig + nwstate + lpopl +
                  lmtnest + ethfrac + polity2l + s(gdpenl) + s(relfrac)    
Probit <- gam(war.eq, family = binomial(link = "probit"), data = war)                 
summary(Probit)


coef(Probit)[(which(names(coef(Probit)) == "s(gdpenl).9"))]

coef(bpo0)[(which(names(coef(bpo)) == "s(gdpenl).9"))]


probitW <- bpoW <- bpoReb <- bpoGov <- NA
gdp.grid <- seq(0, 8)

median.values <- data.frame(t(apply(war, 2, FUN = median)))

for (i in 1:length(gdp.grid)){

newd <- median.values; newd$gdpenl <- gdp.grid[i]
eta1 <- predict(bpo0, eq = 1, newd)
eta2 <- predict(bpo0, eq = 2, newd)
probitW[i] <- predict(Probit, newd, type = "response") 
bpoW[i]    <- pnorm(eta1)*pnorm(eta2) 
bpoReb[i]  <- pnorm(eta1) 
bpoGov[i]  <- pnorm(eta2) 

}


plot(gdp.grid, probitW, type = "l", ylim = c(0, 0.55), lwd = 2, 
     col = "grey", xlab = "GDP per Capita (in thousands)", 
     ylab = "Pr(Outcome)", main = "Probabilities for All Outcomes", 
     cex.main = 1.5, cex.lab = 1.3, cex.axis = 1.3)
lines(gdp.grid, bpoW,   lwd = 2)
lines(gdp.grid, bpoReb, lwd = 2, lty = 2)
lines(gdp.grid, bpoGov, lwd = 2, lty = 3)

#dev.copy(postscript, "probWAR.eps", width = 8)
#dev.off() 


## End(Not run)

#

JRM documentation built on July 13, 2017, 5:03 p.m.