Causal inference · Sensitivity analysis · Case 1 of 2
In 2003–04 the government of Sudan and the Janjaweed militia it backed attacked villages across Darfur, in western Sudan. Years later, researchers surveyed 1,276 Darfurian refugees in camps in eastern Chad. Some had been physically injured in the attacks; others had not. Did being harmed change how they felt about making peace?
Assumes multiple regression with control variables, and R² as the share of variation a variable explains. No sensitivity analysis needed beforehand.
| Role | Variable | What it is |
|---|---|---|
| Treatment | directlyharmed | 1 if the person was physically injured in an attack (529 people), 0 if not (747) |
| Outcome | peacefactor | Pro-peace attitudes, combined from several survey questions (e.g. “Would you make peace with your former enemies?”), scaled from 0 (least) to 1 (most) |
| Controls | village | Which of 486 villages the person came from |
female, age | Gender (582 women) and age | |
farmer_dar, herder_dar | Was a farmer / a herder in Darfur | |
pastvoted, hhsize_darfur | Had voted before the conflict; household size in Darfur |
Two stories are both plausible. Violence could leave people angry: wanting revenge, opposed to peace with those who attacked them. Or it could leave them weary: wanting the fighting to stop at almost any price.
Your prediction. Compare people from the same village, of the same gender, age and so on. How do you expect those who were harmed to differ?
The regression on step 2 settles which story the data favour. Go on when your group is ready.
The setup cell loads the data and fits the regression: peacefactor (how pro-peace a person is, from 0 = least to 1 = most, combined from several survey questions such as “Would you make peace with your former enemies?”) on directlyharmed (1 if injured in an attack, 0 if not) plus every control, with one dummy per villageThis compares harmed and unharmed people within the same village, so anything a village shares (where it is, who attacked it, local politics) can’t confound the estimate.. It runs on its own the first time you run a cell below, and prints the regression’s results (the 486 village dummies are left out of the printout).
Run this cell once: the regression’s results appear under the setup cell above. Then copy the three numbers in the directlyharmed row into the three lines below, replacing each NA, and run it again.
Take note: is directlyharmed statistically significant at the 5% level? Look at its p-value, Pr(>|t|), or check whether its t-statistic is beyond ±1.96. You’ll need this on step 3.
directlyharmed; its first three numbers are the estimate, the standard error and the t-statistic, in that order.What does it mean? peacefactor runs from 0 to 1 (its standard deviation is 0.35). Which reading of the estimate is right?
First, from step 2. True or false: in the regression, the coefficient on directlyharmed is statistically significant at the 5% level.
The regression compares harmed and unharmed people from the same village. The researchers argue that within a village the violence was largely indiscriminate: bombings were too crude to pick out individuals, and attackers had little basis for choosing one villager over another. The one clear exception: women were targeted, often with sexual violence. That is why female is in the model.
Still, suppose something unmeasured, call it Z, made some people both more likely to be harmed and more pro-peace. Then part of the 0.097 would be Z, not harm. We can’t measure Z, but we can ask how strong it would need to be to change our conclusion, in either of two ways: to bring the estimate all the way down to zero, or just to make it no longer statistically significant. Two numbers describe Z’s strength:
peacefactor (after harm and the controls) that Z explains.Both are partial R² values, between 0% and 100%.
Your prediction. Say Z explains the same share of both. What is the smallest share that would bring the estimate all the way down to zero?
Where along the diagonal does the estimate reach zero? Where does it stop being significant? The two strengths start locked together; drag either slider. Then unlock them: can a confounder that is very strong on one side but weak on the other do the same damage?
From the dials: what equal strength brings the estimate to zero? Answer to the nearest whole percent.
The bias a confounder causes depends only on these two strengths and on numbers the regression already reports:
bias = SE × √( df × R²Y~Z × R²D~Z / (1 − R²D~Z) )
Here SE is the standard error (0.0233), df the residual degrees of freedom (783), and R²Y~Z, R²D~Z Z’s partial R² with the outcome and with the treatment. Every point on the chart is this formula.
A robustness value of 13.9% means nothing until we know whether a confounder that strong is likely. Observed covariates give a yardstick. Gender was the main known basis for who was targeted, and it strongly predicts attitudes to peace. In this data, after the other controls:
| A confounder as strong as gender would explain | Share |
|---|---|
| of the leftover variation in being harmed | 0.9% |
of the leftover variation in peacefactor | 12.5% |
“2× gender” doubles both shares, “3× gender” triples them.
Your prediction. Suppose Z were three times as strong as gender, on both sides. What happens to the estimate of 0.097?
Press “Show benchmarks”. Where do 1×, 2× and 3× gender fall relative to the dashed zero line and the shaded regions?
| Confounder as strong as | With treatment | With outcome | Adjusted estimate | Adjusted t-statistic |
|---|---|---|---|---|
| 1× gender | 0.9% | 12.5% | 0.075 | 3.44 |
| 2× gender | 1.8% | 24.9% | 0.053 | 2.60 |
| 3× gender | 2.7% | 37.4% | 0.030 | 1.63 |
Even three times gender leaves the estimate positive, at about a third of its size; only there does it lose significance (t = 1.63). The analysis does not prove no such confounder exists. It turns an open-ended worry (“there might be confounding”) into one specific question: is there an unmeasured factor three times as strongly tied to being harmed, and to attitudes, as gender? Given how the attacks were carried out, the authors argue that is implausible.
Name one unmeasured factor that could confound this estimate. Could it plausibly be three times as strong as gender? One or two sentences.
The sensemakr package does all of this in one call. benchmark_covariates = "female" and kd = 1:3 ask for the 1×, 2× and 3× gender bounds.
Run the call and read the printout. Then store the two robustness values from step 3, as proportions (0.05 means 5%). Both are in the table darfur_sens$sensitivity_stats:
rv: the robustness value, the equal strength (with treatment and outcome) a confounder needs to bring the estimate to zero. It is the column rv_q (q = 1: explain away 100% of the estimate).rv_sig: the robustness value for significance, the equal strength a confounder needs to make the estimate no longer statistically significant at 5%. It is the column rv_qa (a for alpha = 0.05).rv <- darfur_sens$sensitivity_stats$rv_qRun the cell; then delete the # in front of the next line and run it again.
peacefactor. Each curve shows the estimate shrinking as Z’s strength with the treatment grows; the red ticks on the horizontal axis mark 1×, 2× and 3× gender.On the t-statistic plot, where does 3× gender fall?
On the extreme-scenario plot, take the worst case: Z explains 100% of the leftover variation in peacefactor. How strong with the treatment must Z then be to bring the estimate to zero?
As a group: which sentence belongs in the paper?
The second sentence is the honest one. The first ignores confounding: a p-value says nothing about bias. The third throws away what the analysis found: “any” confounder cannot explain it, only one stronger than 13.9% on both sides. The fourth claims too much: sensitivity analysis never shows that confounding is absent. It says how strong confounding would have to be, and leaves the reader to judge whether that is plausible, with gender as the yardstick.
Exit question: in your own words, what does a robustness value of 13.9% tell a skeptical reader? Two sentences.
As a group: pick a finding from your own studies or life that compares people who did and didn’t get something (students who used a tutoring centre, say, but find your own). Which hidden factor worries you most, and which measured factor would you use as its yardstick, the way gender was used here? Could the hidden one plausibly be several times stronger?
You should now be able to:
sensemakr (steps 4 and 5);Data and method: Hazlett, C. (2020). Angry or weary? How violence impacts attitudes toward peace among Darfurian refugees. Journal of Conflict Resolution, 64(5), 844–870. Cinelli, C., & Hazlett, C. (2020). Making sense of sensitivity: Extending omitted variable bias. Journal of the Royal Statistical Society, Series B, 82(1), 39–67. Data from the R package sensemakr (Cinelli, Ferwerda & Hazlett), following its vignette.
Share of the leftover variation in that Z explains, after the controls.
Share of the leftover variation in that Z explains, after treatment and controls.
| Adjusted estimate | |
| Bias Z would cause | |
| Adjusted standard error | |
| Adjusted t-statistic |
You can also click or drag on the chart.