
Bad controls and wrapping up
Two kinds of controls hurt: colliders, which we met earlier, and now mediators.
A mediator sits on the causal path from \(X\) to \(Y\)
Controlling for it removes the part of the effect that travels through it
Does attending preschool make a child more likely to graduate from high school?
Family income affects both. Better-off families are more likely to pay for preschool, and their children graduate more often. Income is a confounder, so we control for it.
Some argue that natural aptitude also drives graduation. We cannot measure aptitude, but we do have reading scores in first grade. Why not control for those?
Should we?

Preschool comes before first grade and plausibly raises reading. Part of its effect runs through reading: a mediator
Aptitude does not affect who attends preschool, so it was never a confounder. There was nothing to fix
I built a world that follows the diagram, so I know the true effect:
set.seed(8410)
n <- 50000
income <- rnorm(n) # family income, standardized
preschool <- rbinom(n, 1, plogis(income)) # richer families enroll more
aptitude <- rnorm(n) # in the world, not in our data
reading <- 0.5 * preschool + 0.6 * aptitude + rnorm(n, 0, 0.4)
p_grad <- 0.55 + 0.05 * preschool + 0.06 * reading +
0.03 * income + 0.04 * aptitude # chance of graduating
grad <- rbinom(n, 1, p_grad) # graduated (1) or not (0)
kids <- tibble(income, preschool, aptitude, reading, grad)Directly, preschool raises the chance of graduating by 5 points
Through reading, it adds 0.5 × 6 = 3 more: preschool raises reading by 0.5, and each unit of reading is worth 6 points
So the true total effect is 8 percentage points
Leave out income: 10.7 points. Too big, because preschool children come from richer families
Control for income: 8.1 points. Right.
Add reading: 2.8 points. Most of the effect is gone
You might hope the third model at least recovers the direct effect of 5 points. It gives 2.8.

Reading has arrows in from preschool and from aptitude. It is also a collider, like the admissions committee earlier
Among children with the same reading score, the ones who skipped preschool got there some other way: more aptitude, which also helps them graduate
So holding reading fixed makes preschool look worse than it is
If we want to account for aptitude, we need a measure that preschool cannot have caused. In practice, that means one taken before preschool.
[1] 0.08130557
Controlling for it is harmless: 8.1 points, close to the true 8.
The timing rule: treat any control measured after the treatment as suspect, and ask whether the treatment could have caused it.
Adding a control changed a correct answer into a wrong one
Nothing in the output signals this. All three models look healthy, and the one with reading has the highest \(R^2\).
Only your theory of what causes what tells you which to fit
“I controlled for everything available” is not a defense.
| Variable type | Control for it? |
|---|---|
| Confounder (causes \(X\) and \(Y\)) | Yes — removes bias |
| Collider (caused by \(X\) and \(Y\)) | No — creates bias |
| Mediator (on the path \(X \to Y\)) | No, for a total effect |
| Unrelated to \(X\) | Harmless; may improve precision |
| Consequence of \(Y\) | No — never |
Learned to load, clean, describe, and visualize real data in R
Built probability from sample spaces to conditional expectation
Learned what a sample can and cannot tell you about a population
Fit, interpreted, diagnosed, and criticized regressions
Causal inference by design: experiments, difference-in-differences, regression discontinuity, instrumental variables
Each is a strategy for earning the causal claim that today’s regression cannot assert on its own
You now have every prerequisite
Our outcomes were continuous, or binary and treated as continuous
Logit and probit model binary outcomes properly - and they are built on the Bernoulli distribution you already know
Poisson and negative binomial for counts
Interpretation gets harder: the marginal effect depends on where you evaluate it, which is the calculus point about derivatives of nonlinear functions
We assumed iid throughout, but it’s often violated
Panel and multilevel models for repeated observations and nested groups
Time series for temporal dependence
Spatial and network models when units influence each other
Remember why this matters: dependence does not usually bias \(\hat{\beta}\), but it makes naive standard errors too small.
Political science produces enormous quantities of text: speeches, bills, manifestos, media coverage, social media
Dictionary methods, topic models, scaling, and transformer-based classifiers
Multilingual text analysis opens up new avenues for research across countries, or across linguistic groups within countries
This is where a lot of my research is - and Quant 3 will cover this!
Plot the data first.
Report estimates and intervals, not yes or no verdicts
State precisely what you are trying to estimate!
Write reproducible code. Make sure you understand the code, whether you or an AI model wrote it.
Statistics is not a set of tests to look up. It is a way of reasoning about uncertainty.
Every method estimates something specific. Know what each one does.
Significance is not importance!
Thank you! This was a hard course and you made it!
What do you want to go over?