Created
October 15, 2014 17:43
-
-
Save carlislerainey/0df07183e5b924c2674a to your computer and use it in GitHub Desktop.
Estimate an ordered probit model.
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
# replication of Hill, Moore, and Mukherjee (2013) | |
# load packages | |
library(arm) | |
# load data | |
d <- read.csv("http://crain.co/am-files/data/hmm.csv") | |
# examine data | |
names(d) | |
xtabs(~ d$tort) | |
# make tort and *ordered factor* | |
d$tort <- as.ordered(d$tort) | |
# create variable | |
d$logHROsec <- log(1 + d$HROsecretariatlocation) | |
# estimate the ordered probit | |
m <- polr(tort ~ logHROsec + WoverS + cat_rat + allterror + lngdp + lnpop, | |
data = d, method = "probit") | |
display(m) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment