Russett and Oneal (2001) data set used in Rainey (2016) to illustrate compression in logistic regression models. These are the data to reproduce the logistic regression coefficients in Table 2 on p. 11 of the Appendix to Rainey (2016). Note that I've altered the coding of some variables, so the coefficients won't replicate exactly.
Format
A dyad-year data set.
statea
the first state in the dyad
stateb
the second state in the dyad
stateaname
the name of first state in the dyad; created with countrycode
statebname
the second state in the dyad; created with countrycode
year
the year
dispute
a factor variable indicating the onset of conflict, specifically the onset of a militarized interstate dispute
allies
a factor variable indicating whether the members of the dyad are allies or not. Allies are linked by a mutual defense treaty, neutrality pact, or entente.
lcaprat2
the logged ratio of the stronger state's military capability index to that of the weaker member
contiguity
factor variable indicating whether the members of the dyad are contiguous or not
dem.lo
the smaller of the two Polity IV scores in the dyad
logdstab
the logged number of miles between the capitals
power
factor variable indicating whether the dyad is minor powers or at least one member is a great power.
References
Russett, Bruce, and John R. Oneal. 2001. Triangulating Peace: Democracy, Interdependence, and International Organizations. New York: W. W. Norton.
Rainey, Carlisle. 2016. "Compression and Conditional Effects: A Product Term Is Essential When Using Logistic Regression to Test for Interaction." Political Science Research and Methods 4(3): 621–39. doi:0.1017/psrm.2015.59 .
Rainey, Carlisle. 2015. "Replication Data for: Compression and Conditional Effects." doi:10.7910/DVN/ASSC0Y .
Examples
# a simple example
ro <- crdata::ro2001
# glm version of their gee on pp. 314 with no product term
m.noprod <- glm(dispute ~ allies + lcaprat2 + contiguity + dem.lo + logdstab + power,
family = "binomial", data = ro)
# glm version of their gee on pp. 314 with no product terms
m.prod <- glm(dispute ~ allies + lcaprat2 + contiguity + dem.lo*logdstab + power,
family = "binomial", data = ro)
# there are no non-contiguous minor powers in this data set
table(ro$contiguity, ro$power)
#>
#> At Least One Great Power Minor Powers
#> Contiguous 5348 9423
#> Noncontiguous 25225 0