Skip to content
StatsOtter A workspace for causal thinking
Method library WORKFLOW / 021
Research workflow/4 steps

Sensitivity analysis for unobserved confounding (sensemakr)

Source sensemakr — Cinelli & Hazlett
01
The method workspace

Follow the analysis.

Select a node to explore the method

Method mapInput → 4 steps → output
START WITHInput data
ARRIVE ATResults
Read step 01
Inside the methodReasoning, equations & implementation
Step 1 of 4
01
Data prep

Fit the OLS outcome model

Data preparation — shapes the raw inputs into what the estimator expects.

What happens here

Outcome ~ treatment + observed covariates.

Reads fromNot specified Feeds into#2
Key code
fit <- lm(peacefactor ~ directlyharmed + age + female + ..., data = darfur)
Discussion on this step (0)
StatsOtterDiscussion starter · Editorial note

Before using this step, make its assumptions and its output explicit. A useful peer note explains what you would check, what could go wrong, or what would change your interpretation.

Questions to explore
  1. Which assumption matters most here, and what evidence could challenge it?
  2. What would you check before passing this output to the next step?

Peer discussion

  • Bring your experience, a question, or a different perspective.
02
Data contract

Inputs & data

A fitted OLS outcome model: outcome ~ treatment + observed covariates.

Show data format & exampleHide example

Format — one row per unit: outcome Y, treatment D, covariates X.

   Y     D   X1   X2  ...
 3.2     1  0.4  -1.1
 1.8     0 -0.1   0.6
03
Read the evidence

Results & interpretation

3 figures Workflow discussion 2
01FigureContour plot of the point estimate: how strong a confounder must be (vs observed covariates) to drive it to zero.
02FigureThe same sensitivity contours, drawn for the t-value (statistical significance).
03FigureExtreme-scenario analysis: the estimate as hypothesised confounder strength grows.

Figures reproduced from sensemakr — Cinelli & Hazlett — unofficial community showcase; all credit to the original authors.

Context & interpretation

The sensemakr vignette (Cinelli & Hazlett). Fit your model, then report how strong hidden confounding would need to be to change the conclusion. Unofficial summary.

Peer notes

Discuss the workflow (2)

  • 3

    Unconfoundedness is an assumption, not a fact. sensemakr makes you state HOW wrong you could be. Every observational paper should include this.

    6

    The robustness value is such a clean one-number summary. 'A confounder would need to explain 15% of residual variance to overturn this.'

  • 4

    Benchmarking against observed covariates is the killer feature — 'as strong as 3× the effect of female' is interpretable.

IN THE MARGINS

Peer discussion