Skip to content

Instantly share code, notes, and snippets.

@diamonaj
Last active November 7, 2018 14:39
Show Gist options
  • Select an option

  • Save diamonaj/57bc43f07e1069f3b035dc5d05714206 to your computer and use it in GitHub Desktop.

Select an option

Save diamonaj/57bc43f07e1069f3b035dc5d05714206 to your computer and use it in GitHub Desktop.
*****INSTRUCTIONS*****
This assignment requires the peacekeeping data set that we worked on in class, as well as this codebook:
http://www.nyu.edu/gsas/dept/politics/faculty/cohen/codebook.pdf.
The class breakout instructions (including data download code) are here:
https://gist.github.com/diamonaj/3795bfc2e6349d00aa0ccfe14102858d
(1) Replicate figure 8 in https://gking.harvard.edu/files/counterf.pdf.
(2) Define treatment as below:
Tr <- rep(0, length(foo$untype))
Tr[which(foo$untype != "None")] <- 1
What does this mean? What is "treatment"?
(3) Let's pretend you work for an NGO and your manager asks you to estimate the impact of the treatment identified above on lenient
peacebuilding success 2 years and 5 years after the war.
(a) In no more than 1 sentence, articulate the causal question as best you can (being as clear as you can about treatment and control:
(b) In no more than 1 sentence, explain how/why SUTVA might be violated here. In no more than 1 sentence, explain how you could in
theory use the "restrict" argument (in Match()/GenMatch()) to help address this potential problem.
(c) Use simple logistic regression, propensity score matching, and genetic matching to try to answer these questions.
For the matching exercises, measure balance on AT LEAST the basic variables we considered in the class exercise.
For the genetic matching exercise, population size should be at least 200 and you should run it for at least 25 generations
(which may require you to modify the number of non-changing generations). When performing genetic matching, take a little time to try
different approaches to producing excellent balance. You can tweak the values of "M", you can do caliper matching, you can match
on quadratic and/or interaction terms, you can add a propensity score, etc.
JUST ONE WORD OF ADVICE: The precise way you run GenMatch is how you have to run Match. For example, if you run GenMatch with M = 2 and
X includes interaction terms et., then in the next line of code you have to run Match exactly the same way (using the GenMatch output
as the weight.matrix). Then in the next line you run MatchBalance, using the Match output.
Match without replacement, and allow ties. Ideally, you would measure/optimize balance on the interaction terms and quadratic terms
as well (but this will make things a little harder than simply balancing on the basic variables).
Your final answer should include:
(i) a table like this one:
leximin p-value tmt effect (bias adj) tmt effect (no bias adj) p-value
logistic regression
len success 2 years NA*
len success 5 years NA*
p- score matching
len success 2 years **
len success 5 years **
gen match
len success 2 years **
len success 5 years **
*No need to provide bias-adjusted results for logistic regression--only for matching estimates.
**Only provide a treatment effect for matching results if your leximin p-value is above 0.10. Otherwise write in "NA".
(ii) a brief memo of no more than approximately 250 words that provides evidence-based policy guidance based on your findings.
Put your 1-2 sentences summarizing the policy advice in BOLD text. Make sure your memo begins with 2-3 sentence summary, also in BOLD.
Your memo should include a table that shows all the treated units (id numbers, countries, and year conflict began) and
their matched controls (including ties) **for len success 5 years genetic matching results only**.
The word limit does not include words in this table.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment