In this exercise, we will explore the proposition that partisans acquire political information and form evaluations differently from nonpartisans, even given a shared political context. To test this hypothesis, we will compare self-identified Republicans with self-identified Independents and those who report no par- tisan preference in the 2016 American National Election Study data.
It’s of course possible to directly download the ANES data from the website and load it manually, but it’s also available through an R library for convenience:
Begin by recoding variable v161155 such that Republicans get a score of 1, independents/no preference respondents get a score of 0, and all others are missing.
Potential confounding variables include education (v161270), social class (v161307), race (V161310x), region of residence (V163003), and degree of attention to politics (V161003). Recode these variables in a suitable way. Note that negative numbers should usually be missing, and numbers in the 90s are often error codes of some kind.
First, estimate a propensity score for Republican identification conditional on these variables:
temp1 <- lm(repvind ~ ed + class + race + region + attention, data=anes2016)
pscore1 <- fitted(temp1)Briefly discuss the adequacy of the model, as well as the substantive patterns that you find. Make any corrections or adjustments that seem relevant.
Let’s check whether Republican partisans use social media to learn about politics (V161495) more often than non-partisans — a variable called repvind below. First, set up a clean data set for the matching exercise:
mediadata <- na.omit(data.frame(repvind=anes2016$repvind, ed=anes2016$ed,
class=anes2016$class, race=anes2016$race, region=anes2016$region,
attention=anes2016$attention, internetnews=anes2016$internetnews))Using this cleaned data set, re-estimate your propensity score model and store fitted values from that model in a new variable. With this propensity score, run a pairwise matching estimate of the effect of Republicanness on internet usage. What are your results? Check the quality of balance after matching.
The main library we use for matching in class is called Matching, and you can find the R supporting materials here. The core code isn’t hard to use, once you’ve gotten rid of missing data and estimated a propensity score. Just do something like this:
matchoutput <- with(DATA_WITHOUT_NAS ,Match(
Y=OUTCOME_VARIABLE, Tr=TREATMENT_VARIABLE, X=PROPENSITY_SCORE, est="ATT"))
summary(matchoutput)Experiment with the caliper, CommonSupport, BiasAdjust, and Exact parameters to the matching function. Do any of these alternative estimators change your results?
What if you change the specification of your propensity score? Do your results change meaningfully, or not? What does this finding mean?