GV900 Political Explanation
Bi-weekly homework assignment 5
Perform the necessary statistical analyses using R, and submit the R code le named as
gv900-HW5-YOURNAME.R. You also need to submit a coversheet.
1. Merge the Polity data set with the CIRI data set. The CIRI data set contains a lot of
variables that can be used as an identier variable. For this task, use the POLITY variable
in the CIRI data set as an identier because this is the identier specically designed for
the purpose of combining CIRI with Polity. In doing so, match it with the ccode variable
in the Polity data set.
2. Do democracies (i.e., those countries that score greater than 5 on the polity2 variable)
perform better than non-democracies in terms of protecting physical integrity rights of the
citizens? Perform an appropriate bivariate test to answer this question. Provide a verbal
report of the ndings as a comment (Note: this is not a write-up. No need to provide a
detailed causal theory, null hypothesis, etc. Just give me a brief report of the ndings.)
3. The CIRI data set spans the time frame between 1981 and 2011. Have the countries
improved upon physical integrity rights scores over the years? Answer this question by
comparing the scores from 1981 and 2011 and performing an appropriate bivariate test.
Provide a verbal report of the ndings as a comment
Hint 1: This task is pretty hard. There are several dierent ways to do this, but
probably the easiest way would be to construct two smaller data sets, one for 1981,
the other for 2011, then merge the two data sets so that we can have a new data set
that contains the scores for 1981 and 2011 in dierent columns.
Hint 2: The appropriate test would be the \paired” version of some bivariate hy-pothesis test.
4. Use the dyad-year data set introduced in the class (drbcmcdata.txt). Download the
COW military alliance data (not ATOP data) and merge the two data sets so that we
can have a new variable that measures whether or not a dyad has a nonaggression treaty
between them in a given year. What percentage of dyad-years with a nonaggression
treaty have experienced militarized disputes? What percentage of dyad-years without a
nonaggression treaty have experienced militarized disputes? Based on the ndings, can
we say nonaggression treaties prevent con
ict? Provide a brief answer as a comment.
Hint 1: There are several dierent versions of the COW alliance data set. What you
need is the dyad-year version (alliance v4.1 by dyad yearly.csv)
Hint 2: As we have seen, the drbcmcdata.txt data set contains the dyadid variable,
which is equal to ccode1 * 1000 + ccode2 if ccode1 < ccode2 and equal to ccode2
* 1000 + ccode1 if ccode1 > ccode2, where ccode1 and ccode2 are the COW
country codes for the two countries in a dyad. That is, the two country codes are
arranged so that the smaller of the two comes rst. For example, the dyad ID for
a dyad between 365 and and 800 is 365800 (= 365 * 1000 + 800), and not 800365
1
(365800 and 800365 would represent the same dyad, and the data set only includes
365800 but not 800365 in order to avoid duplicates). For another example, the dyad
ID for a dyad between 2 and 20 is 2020 (= 2 * 1000 + 20). You would rst need
to create a dyad ID variable in the alliance data set before merging it with the
drbvmcdata.txt data set.
Hint 3: Some dyads have more than one treaties in a given year, in which case the
observations get duplicated. To avoid duplicated observations to be merged into
the drbcmcdata.txt data set, do the following before merging: cowal.nonag <-unique(cowal.nonag), where cowal.nonag is an object that stores the dyadid, year,
and a variable that measures whether or not a dyad has a nonaggression treaty in a
given year. There should be 47547 unique dyad-year observations with nonaggression
treaties in the COW data set after deleting duplicates.
5. Use the 2012 general social survey data set GSS2012.DTA and conduct a bivariate hypoth-esis test of the so-called interviewer eect. Use interviewer’s race and subject’s attitude
toward armative action to get at the interviewer eect.
End of l