Causal inference · Unconfoundedness · Remix §5.2

Confounder, collider or neutral?

Assumes you have read Ch. 5 of Cunningham's Causal Inference: The Remix (§5.2). Work through the numbered steps in order. About 25 minutes.

Haven't read it? Here's what you need

A DAG draws causes as arrows. To get the effect of D on Y, only the causal path D → Y should stay open. A backdoor path starts with an arrow into D, like D ← W → Y. Controlling for W, a confounder, closes it.

A collider is a variable two arrows point into, like D → F ← Y. Leave it out: controlling for it opens a false link. A variable that only affects Y is neutral. It fixes no bias but can make estimates more precise.

Which variables must you control for?

Study the DAG, then tick every variable you must control for.

Did a first-class ticket (D) raise your chance of surviving the Titanic (Y)? Here is the DAG from §5.2.

To estimate the effect of D on Y, which variables must you control for? Select all that apply.

W, woman
C, child
F, famous later
S, thermal swimsuit

What happens if you also control for fame?

Predict and lock in. You'll test it in step 3.

In our simulated voyages, first class raises every passenger's chance of surviving by exactly 15 percentage points (pp). A regression that controls for W and C recovers +15 on average.

Predict: add F to a regression that already controls for W and C. The estimate of D's effect will…

stay near +15 pp
rise above +15 pp
fall below +15 pp
stay near +15, but noisier

Right direction. In step 3, tick W, C and F and see how far it falls.

Not quite. Look at the two arrows into F: first class and survival both raise fame. In step 3, tick W, C and F and compare the average with +15.

Not quite. Look at the two arrows into F. In step 3, tick W, C and F and check which side of +15 the average lands.

Which control set should you use?

Tick controls (or press a preset) and watch where the histogram centres. Then answer below.

Each of 200 simulated voyages gives one estimate of D's effect: a regression of survival on D plus your controls.

Control for

Which set is unbiased and most precise?

Nothing
W and C
W, C and S
Everything (W, C, F, S)

Compare the bias and spread of each control set.

Answer the question in 3a first. The comparison opens here.

Would more passengers fix “Everything”?

Predict and lock in, then compare the two rows that appear.

On voyage set 1, Everything (W, C, F and S) gave a histogram as narrow as the valid sets, centred near pp.

Predict: with 10 times as many passengers per voyage, its average would…

move toward +15 pp
stay about where it is
move further from +15 pp

Everything, averaged over many voyage sets:

Right. More passengers shrink the spread, not the bias. D → F ← Y stays open at any sample size, so you get a more precise wrong answer.

Not quite. Compare the two rows: the spread shrinks and the average stays put. The bias comes from the open path D → F ← Y, and more passengers don't close it.

Why does controlling for fame backfire?

Compare the bar pairs overall and in each fame group, then answer.

Adult men have W = 0 and C = 0, so no backdoor path is open for them. The bars pool all adult men in the 200 voyages.

Among adult men the first-class gap is near +15 pp overall, yet smaller in both fame groups. Why?

Fame is a confounder; splitting by it removes bias.
In a fame group, class and survival compete to explain fame.
The famous group is small; its gap is mostly noise.
Both groups can't fall below the total; it's rounding.

Which covariates belong in the regression?

Tick every covariate you would control for, then check.

Now there is no DAG. You compare 1978 earnings of people who took a job-training program in 1976–77 with non-participants from a national survey.

Which would you control for? Select all that apply.

Age
Years of education
Earnings in 1974
Earnings in 1975
Employed at the 1978 follow-up
Job interviews arranged by the program

How could you test your choice of controls?

Pick a design and press Check.

A placebo analysis estimates the “effect” of training on an outcome it cannot have changed (Imbens and Rubin; Imbens and Xu). Its true value is zero.

Which is a valid placebo test for the training study?

Outcome: 1975 earnings. Controls: age, education, 1974 earnings. Expect about zero.
Outcome: 1978 earnings, with every control you have. Expect about zero.
Outcome: employment in 1978. Expect the same effect as on earnings.
Outcome: 1978 earnings with no controls. Expect a large effect.

You can now sort covariates into confounders, colliders and neutral ones, tell bias from imprecision, and choose and test controls without a DAG.

Assumptions behind the numbers

Left out: M-bias, where a pre-treatment variable is itself a collider (the book's footnote 4); choosing covariates by regressing pre-treatment outcomes on candidates; Cinelli, Forney and Pearl's (2022) catalogue of good and bad controls; and automated covariate selection, which can be biased unless colliders are removed first (Hünermund, Louw and Caspi 2023).