## Submission Instructions

Please submit your problem set via GauchoSpace. Submit both the `.Rmd` file and the `HTML` file it creates. This assignment is due by 11:55pm on Tuesday, July 28th. No late problem sets will be accepted. Please write your name below, and list any students you collaborated with.

### Name:
### Students you collaborated with:



***



# Question 1. Social Pressure and Voter Turnout (3 points total).

Read the article, "Social Pressure and Voter Turnout: Evidence from a Large-Scale Field Experiment" posted on GauchoSpace for this week.

**a. (1 point total)**
The researchers have a main finding. For this main finding, what is their independent variable? What is their dependent variable? **(0.2 points)** For these variables, state the researchers' null and alternative hypotheses. **(0.4 points)** Given this is an experiment, what is another term for our independent variable in this context? **(0.4 points)**


**b. (0.5 points)**
Examine Table 1. Describe what this table is showing the reader. After looking at this table, what variables would you tell the researchers they need to include in their multivariate regression as control variables?


**c. (0.5 points)**
Examine Table 2. What is the average treatment effect of the "Self" treatment? Show your calculation.


**d. (1 point total)**
Examine Table 3. Intepret the coefficient in the *top left cell* in terms of its statistical and substantive significance using the substantive meanings of the IV and DV. **(0.4 points)** How does this coefficient change if the authors include covariates in their model? **(0.3 points)** What does this tell us about their research findings? **(0.3 points)**



# Question 2. Assassinations Data (4 points total).

One longstanding debate in the study of international relations concerns the question of whether individual political leaders can make a difference. Some emphasize that leaders with different ideologies and personalities can significantly affect the course of a nation. Others argue that political leaders are severely constrained by historical and institutional forces.

Did individuals like Hitler, Mao, Roosevelt, and Churchill make a big difference? The difficulty of empirically testing these arguments stems from the fact that the *change of leadership is not random* and there are many confounding factors to be adjusted for.

In this exercise, we consider a **natural experiment** where the success or failure of assassination attempts is *assumed* to be essentially random. That is, whether or not there was an assassination attempt is not random. But whether or not that assassination attempt was successful is plausibly exogenous.

Each observation of the data-set `leaders.Rdata` contains information about an assassination attempt. Below are the names and descriptions of variables in this leader assassination data-set. The `polity` variables document and quantify the regime types of all countries in the world from 1800. The polity score is a 21-point scale ranging from −10 (hereditary monarchy) to 10 (consolidated democracy). In this data-set, the `result` variable is a 10-category factor variable describing the result of each assassination attempt. These are the other variables:

Variable Name  | Description 
------------- | ------------- 
country | country
year | year
leadername | the name of leader who was targeted 
age | the age of targeted leader
politybefore | average polity score of country over the 3 years prior to the attempt
polityafter | average polity score of country over the 3 years after the attempt
civilwarbefore | 1 if country is in civil war during 3 years prior to the attempt, 0 otherwise
civilwarafter | 1 if country is in civil war during 3 years after the attempt, 0 otherwise
interwarbefore | 1 if country is in international war during 3 years prior to the attempt, 0 otherwise
interwarafter | 1 if country is in international war during 3 years after the attempt, 0 otherwise
result | the result of assassination attempt

As usual, set your working directory and load the data.


**a. (0.5 points)**
Descriptive statistics. What is your sample size? How many countries experience at least one leader assassination attempt? (`The unique()` function, which returns a set of unique values from the input vector, may be useful here). What is the average number of such attempts (per year) among these countries?


**b. (0.5 points)**
Create a new binary variable named `success` that is equal to 1 if a leader dies from the attack and to 0 if the leader survives. Store this new variable as part of the original data frame. What is the overall success rate of leader assassination?


**c. (1 point total)**
Investigate whether a country's experience of civil and international war differs on average between successful and failed assassination attempts. Create a new binary variable in the data frame called `warbefore`, such that it is equal to 1 if a country is in either civil *or* international war during the 3 years prior to an assassination attempt. **(0.5 points)**

What does this result imply about the validity of the assumption that the success of assassination attempts is randomly determined? **(0.5 points)**


**d. (1 point total)**
You want to know whether it matters how old the person was when the assassination attempt occurred mattered in terms of the likelihood of the assassination being successful. Using the tools learned in this course, examine whether this is the case and interpret your results. **(0.5 points)** 

What does this say about the assumption that successful assassinations are plausibly exogenous? **(0.5 points)**


**e. (1 point total)**
You want to know what happens after these assassinations. Does successful leader assassination cause democratization? Answer this question by running a regression that controls for past democracy levels. **(0.5 points)**

Interpret the results, and state your assumptions vis-a-vis causation. **(0.5 points)**



# Question 3. Causes of Corruption (3 points total).

In the paper, "The Causes of Corruption: A Cross-National Study", Daniel Treisman examines possible determinants of perceived corruption. The data he uses is saved in `corruption.Rdata`. Below is the list of the variables.

Variable Name  | Description 
------------- | ------------- 
TI98 | Transparency International's annual index of "perceived corruption" for 1998, ranging from 0 (least corrupt) to 10 (most corrupt)
commonlaw | 1 if common law legal system, 0 if civil law legal system
britcolony | 1 if UK or former British colony, 0 otherwise
noncolony | 1 if never a colony, 0 otherwise
pctprot | protestants as a % of total population
elf | ethnolinguistic fractionalization index, measuring the probability as of 1960 that two randomly selected people from the given country will not belong to the same ethnolinguistic group (simply put, higher scores mean higher levels of fragmentation)
FMMexports93 | the proportion of exports comprising fuels, metals, and minerals in 1993, from the World Bank’s World Development Reports

As usual, load the data.


**a. (0.5 points)**
Descriptive statistics. Explore the perceived corruption variable. What is this variable's maximum and minimum? What is the mean level of perceived corruption? What is the standard deviation? What kind of variable is this? Create a density plot to show how this variable is distributed and substantively interpret what this plot tells you about how corruption is distributed across countries.

Note. When you have missing data, you often need to include `na.rm = T` as an argument in your code.


**b. (1 point total)**
You want to understand what predicts perceived corruption across countries. Run a regression to predict corruption, using `commonlaw`, `noncolony`, the percentage of the population that is protestant, ethnolinguistic fractionalization, and the export data you have as predictors. Interpret your results in terms of statistical significance. Which factors seem to be associated with **increased** corruption? What is your model R-squared?


**Extra credit (0.5 points)**
Show a calculation to explain why we have 58 degrees of freedom. This is a simple calculation. (Hint: read the line below the DF in the regression output.)


**c. (1 point total)**
What happens if you add `britcolony` to your model? Why might you expect this change, given the relationship between the type of law a country uses and its colonial history?

Hint: ![legalsystems](https://upload.wikimedia.org/wikipedia/commons/thumb/9/92/Map_of_the_Legal_systems_of_the_world_%28en%29.png/1920px-Map_of_the_Legal_systems_of_the_world_%28en%29.png)

**Extra credit (0.5 points)**
Explain in statistical terms what is happening, e.g. use the technical term and explanation. Hint: Lecture 6e.


**d. (0.5 points)**
Now let's look at that relationship formally. If a country was formerly a British colony, what kind of legal system would we predict they have? Run a regression and interpret the results.