Last active
August 29, 2015 14:06
-
-
Save carlislerainey/4e5ebb2ac530809ce88f to your computer and use it in GitHub Desktop.
Replicate Fearon and Laitin (2003) (Table 1, Model 1)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# load packages | |
library(foreign) # for read.dta() | |
library(arm) # for display() | |
# load data | |
fl <- read.dta("http://crain.co/am-files/data/fearon-laitin.dta") | |
# something weird is going on | |
table(fl$onset) # wtf? | |
fl$onset[fl$onset == 4] <- 1 # recode weird case | |
# estimate model | |
m <- glm(onset ~ warl + gdpenl + lpopl1 + | |
lmtnest + ncontig + Oil + nwstate + | |
instab + polity2l + ethfrac + relfrac, | |
family = binomial, data = fl) | |
# display estimates | |
display(m) # replicated! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment