AdvancedIndependently reviewed, not yet spot-checked by a human

E-values and sensitivity analysis for unmeasured confounding

An E-value answers one narrow question: how strongly would an unmeasured confounder have to be associated with both the exposure and the outcome to explain away the association you observed? This page covers the formula and the contour geometry behind it, why the point estimate and the confidence limit each need their own E-value, why a hazard or odds ratio must be converted to a risk ratio first, and why a large E-value is not evidence that no unmeasured confounding exists.

What this page is for

There are two moments where an E-value lands in front of you.

The first is reading a paper. A database study reports an association, and the last paragraph of the discussion says “we calculated an E-value of 1.9” and then stops. Is that large or small? What exactly is it guaranteeing? Without an answer, the sentence is decoration that happens to look technical.

The second is being reviewed. Submit a study built on Taiwan’s National Health Insurance Research Database and one of the most frequent reviewer comments you will get is a request for a sensitivity analysis for unmeasured confounding. What is being asked for is almost always an E-value, because it is cheap: no extra data, no validation subsample, three lines of code.

The reason it exists is that observational research has a hole that never closes. Propensity score matching and weighting can only handle the covariates you actually measured; a DAG helps you see which back-door paths need blocking, but it cannot block a path you have no variable for. No better model fixes this. All you can do is quantify it honestly.

The E-value inverts the question: instead of asking whether unmeasured confounding exists, ask how strong an unmeasured confounder would have to be to explain the whole association away. The first question cannot be answered. The second is a number.

The definition: the bias factor and the E-value

Suppose there is an unmeasured confounder UU. It has two association strengths:

  • RREURR_{EU}, the prevalence ratio of UU comparing exposed to unexposed — the confounder’s association with the exposure
  • RRUDRR_{UD}, the risk ratio of UU for the outcome within levels of the exposure — the confounder’s association with the outcome

VanderWeele and Ding proved something rather elegant: the maximum amount by which those two associations can inflate an observed risk ratio has a closed form that involves nothing else. It is called the bias factor.

B=RREU×RRUDRREU+RRUD1B = \frac{RR_{EU} \times RR_{UD}}{RR_{EU} + RR_{UD} - 1}

For the observed risk ratio RRobsRR_{obs} to be explained away entirely you need BRRobsB \geq RR_{obs}. Impose the extra condition that the two associations are equally strong and solve, and out drops the E-value:

E=RRobs+RRobs×(RRobs1)E = RR_{obs} + \sqrt{RR_{obs} \times (RR_{obs} - 1)}

If RRobsRR_{obs} is below 1 — a protective association — invert it first. That is the whole of the mathematics, which is why this page installs no package: the formula is shorter than the documentation of any library that implements it.

The contour geometry is worth more than the formula

Solve B=RRobsB = RR_{obs} for RRUDRR_{UD}:

RRUD=RRobs×(RREU1)RREURRobsRR_{UD} = \frac{RR_{obs} \times (RR_{EU} - 1)}{RR_{EU} - RR_{obs}}

That is a hyperbola with two asymptotes: a vertical one at RREU=RRobsRR_{EU} = RR_{obs} and a horizontal one at RRUD=RRobsRR_{UD} = RR_{obs}. Both asymptotes say the same thing, and it is the single sentence worth carrying away from this page:

To explain away an observed association, the unmeasured confounder’s association with the exposure and its association with the outcome must both exceed the observed association itself. One strong side is not enough. However far you push the other, the curve only approaches its asymptote and never reaches it.

The E-value is one particular point on that curve: the point where the two associations are equal, which is where the curve crosses the diagonal. That point is not chosen because it carries some special causal meaning, but because it is the cheapest combination on the curve — move along the curve in either direction and the other association has to grow. So the E-value is a lower bound: any confounder capable of explaining the association away has at least one side at least this strong.

Two E-values, two different questions

The point estimate and the confidence limit each get their own E-value, and both belong in the report. They ask different things:

  • The E-value for the point estimate asks: how strong a confounder would move the effect estimate back to the null?
  • The E-value for the confidence limit nearer the null asks: how strong a confounder would make this result unable to exclude the null?

The second is the answer to “could confounding overturn this finding”. The reasoning is the same as on the effect size page: a point estimate carries no uncertainty of its own, and to overturn a conclusion you do not have to drag the point estimate to the null, only drag the interval far enough to touch it.

The computation: take the limit of the interval closer to the null and put it through the same formula. When the interval already covers the null, the answer is 1 — no confounding of any strength is needed, because the data are already compatible with no effect.

Reporting only the point estimate’s E-value is common in the literature, and it always makes a result look harder to overturn than it is. The two worked examples below show each of these situations in turn.

The first step is always converting the effect measure to a risk ratio

The formula takes a risk ratio. A hazard ratio is not one and neither is an odds ratio, so feeding either in unconverted gives the wrong answer — and the error has a fixed direction. It is too large, which makes the result look harder to explain away. This is the step most often skipped.

For a hazard ratio there are two routes, and which one is right depends on how rare the outcome is. When the outcome is rare,

RRHRRR \approx HR

is good enough. When it is not rare, VanderWeele’s square-root form is required:

RR10.5HR10.51/HRRR \approx \frac{1 - 0.5^{\sqrt{HR}}}{1 - 0.5^{\sqrt{1/HR}}}

The conventional dividing line is an event proportion of 15%. The blood_storage cohort used in example two has 47 events among 287 complete cases, an event proportion of 16.4%, which is above that line — so the square-root form is the correct route there.

An odds ratio takes a third formula, and it needs something the hazard ratio route does not:

RROR1p0+p0×ORRR \approx \frac{OR}{1 - p_0 + p_0 \times OR}

Here p0p_0 is the baseline risk among the unexposed. As p00p_0 \to 0 the risk ratio approaches the odds ratio, which is the rare-outcome approximation; and when the odds ratio exceeds 1, any p0>0p_0 > 0 makes the risk ratio smaller than the odds ratio. That property becomes the deciding argument in example one.

Example one: an odds ratio from a case-control study, and two E-values far apart

Example one reuses the case-control chapter’s datasets::infert: 1 case : 2 controls, matched on age, parity and education, 248 records, of which 83 are cases and 165 controls. The exposure is a history of induced abortion and the outcome is secondary infertility. That page’s conditional logistic regression, further adjusted for spontaneous abortions, gives:

SourceModelOR95% CIp
D2-case-control-infertconditional logistic regression + spontaneous abortions4.1501.779–9.678< 0.001

Why only the rare-outcome approximation is available here

Converting that odds ratio needs a baseline risk p0p_0, and a case-control study cannot give you one. That fact is itself one of the lessons on this page.

Cases make up 33.5% of the sample, which looks a great deal like a risk. It is not: the ratio of cases to controls was chosen by the design (1 to 2 here), and sampling at a different ratio would change the number. Using it as p0p_0 would be treating a design parameter as a population risk, which is inventing data. The stats file records this as two flags — baselineRiskEstimable is false and caseProportionIsNotP0 is true — so that nobody rerunning the script later picks that proportion up and uses it.

So the rare-outcome approximation is used, which is RR = OR. It is chosen not for convenience but because it is the most generous option: as noted above, when the odds ratio exceeds 1 any p0>0p_0 > 0 gives a smaller risk ratio, and a smaller risk ratio gives a smaller E-value. Taking the p0=0p_0 = 0 limit therefore yields the largest defensible E-value these data can support. If even that maximum fails to convince, no other choice of p0p_0 will help.

To see what the assumption is worth, put a few hypothetical baseline risks through the general formula:

Assumed p0Implied RRE-value, point estimateE-value, lower limit
1%4.027.512.93
5%3.596.632.82
10%3.165.762.69
20%2.554.532.45

The two E-values

Under the rare-outcome approximation the risk ratio equals the odds ratio, so:

  • the point estimate 4.150 has an E-value of 7.77
  • the lower confidence limit 1.779 has an E-value of 2.96

Both are well above 1, and they are far apart. That is precisely why both get reported. Moving the point estimate back to the null would require an unmeasured confounder associated with the exposure and with the outcome at 7.77 each, which is a strong thing to have gone unmeasured. Making the result merely unable to exclude the null needs only 2.96 — less than half as much. A reader given only the first number would form a far more optimistic impression of how settled this finding is.

A contour plot. Both axes are association strengths for an unmeasured confounder: the horizontal axis RR_EU is its association with the exposure and the vertical axis RR_UD is its association with the outcome, both running from 1 to about 11. The background carries a set of thin pale brown contours labelled 1.5, 2.5, 3, 6 and 8, each a hyperbola bending towards the lower left and hugging one vertical and one horizontal asymptote. A thick red solid curve marks a bias factor of 4.150, the combinations that would explain the observed association away entirely; a brown dashed curve marks a bias factor of 1.779, the combinations that would push the confidence interval to the null, and it lies below and to the left of the red curve throughout. A dark dotted diagonal marks the line where the two associations are equal. Where the red curve crosses that diagonal there is a red filled square at coordinates 7.77 on both axes, labelled as the E-value for the point estimate; where the dashed curve crosses it there is a brown diamond at 2.96 on both axes, labelled as the E-value for the lower confidence limit. Four lines of text above the plot give the odds ratio being explained away, 4.150 with a confidence interval of 1.779 to 9.678 for induced abortion and infertility in datasets::infert; the bias factor each curve corresponds to; the fact that a confounder on or beyond the solid curve explains the association away while one beyond the dashed curve carries the interval to the null; and a note that the dotted diagonal is where the two associations are equal and the E-value is where a curve crosses it.
The contours are drawn for example one. The solid curve is the set of confounder strengths that would explain an odds ratio of 4.150 away; the dashed one is the set that would carry the lower limit to the null. Where each crosses the diagonal is its E-value — 7.77 and 2.96.Plotting script figures/scripts/B6-07-e-value.R

This is the only presentation that really does an E-value justice, because it restores the single number to the whole curve it came from. Walk right along the solid curve and the required RRUDRR_{UD} falls as RREURR_{EU} grows, but it never drops below 4.150 — that horizontal asymptote is the observed risk ratio itself. Walking up does the same in mirror image. So the question a reader should actually be asking is not whether 7.77 is a big number, but whether any unmeasured variable in this clinical setting could plausibly sit anywhere on that curve.

Example two: every estimate from one cohort, and every interval E-value at its floor

Example two reuses the cohort behind the propensity score matching and IPTW pages (medicaldata::blood_storage, 287 complete cases and 47 biochemical recurrences) and takes all 7 estimates those two pages produced. The effect measure is a hazard ratio and the event proportion of 16.4% is not rare, so the square-root conversion applies.

EstimateSourceHR (95% CI)Converted RRE-value, pointE-value, interval
Unadjusted CoxB6-021.021 (0.563–1.852)1.0151.141.00
Covariate-adjusted CoxB6-021.270 (0.672–2.399)1.1801.641.00
PSM 1:1, caliper, robust SEB6-021.020 (0.514–2.027)1.0141.131.00
PSM 1:2, caliper 0.2 SDB6-020.835 (0.400–1.741)0.8821.521.00
IPTW, ATEB6-031.070 (0.589–1.945)1.0481.271.00
IPTW, ATTB6-031.203 (0.656–2.206)1.1361.531.00
Overlap weights, ATOB6-031.133 (0.622–2.065)1.0901.401.00

The last column is 1.00 the whole way down.

A line plot. The horizontal axis is the observed risk ratio, with protective ratios inverted, running from 1 to about 4.6; the vertical axis is the corresponding E-value. A blue curve starts at the point where both coordinates equal 1 and climbs to the upper right, steeply at first and flattening as it goes, showing that a risk ratio only slightly above 1 already carries an E-value clearly above 1. A dotted horizontal line marks an E-value of 1. Crowded at the left end of the curve are 7 red dots lying between 1 and 1.18 on the horizontal axis and between 1.13 and 1.64 on the vertical axis; these are the 7 estimates from medicaldata::blood_storage, and two lines of red text to their right give that range of E-values and note that every one of their confidence-interval E-values is 1.00. Further up the curve a dark filled square marks the datasets::infert odds ratio of 4.15 against its E-value of 7.77, and lower down an open white square marks its lower confidence limit of 1.78 against an E-value of 2.96; both are labelled. Two lines of text above the plot say that the E-value grows quickly so weak associations are cheap to explain away, and identify which markers belong to which example.
The E-value is just a function of the observed risk ratio. The red dots are example two's 7 estimates, all bunched at the far left of the curve; the dark markers are example one's odds ratio and its lower limit, sitting much higher.Plotting script figures/scripts/B6-07-e-value.R

Putting both examples on one curve turns “large or small” into a visible position. It also makes a property of the E-value obvious: the curve is steep near the null. Move the observed risk ratio a little away from 1 and the E-value is already appreciably above 1 — so an E-value that looks comfortably greater than 1 may correspond to a very weak observed association. An E-value of 3.41 corresponds to an observed risk ratio of only 2; the observed ratio is not 3 until the E-value reaches 5.45.

Skipping the conversion inflates the E-value, and by how much is measurable

Feed the hazard ratios into the formula unconverted and this is what comes out:

EstimateConverted to RR first (correct)HR used as if it were RRInflation
IPTW, ATE (the headline estimate on B6-03)1.271.34+0.07
IPTW, ATT (the estimand furthest from the null)1.531.70+0.17

The direction is fixed: skipping the conversion always makes the E-value larger, which always makes the finding look harder to overturn. The gap is modest here because these hazard ratios sit close to 1; the further an estimate is from the null and the commoner the outcome, the larger the error grows.

The question to ask of any paper, as a reviewer or as a reader, is: which effect measure was this E-value computed from, and was it converted to a risk ratio? A paper reporting a hazard ratio and an E-value with no mention of conversion in the methods has usually skipped the step.

How to compute it

# --- the E-value itself -----------------------------------------------------
evalue_rr <- function(rr) {
  r <- if (rr < 1) 1 / rr else rr          # invert a protective association
  r + sqrt(r * (r - 1))
}

# The limit of the interval CLOSER TO THE NULL. If the interval covers 1 the
# answer is 1: no confounding is needed, the data already reach the null.
evalue_ci <- function(lo, hi) {
  if (lo <= 1 && hi >= 1) return(1)
  if (lo > 1) evalue_rr(lo) else evalue_rr(hi)
}

# --- convert the effect measure to a risk ratio first ------------------------
hr_to_rr_rare   <- function(hr) hr                                    # rare outcome
hr_to_rr_common <- function(hr) (1 - 0.5^sqrt(hr)) / (1 - 0.5^sqrt(1 / hr))
or_to_rr        <- function(or, p0) or / (1 - p0 + p0 * or)           # p0 = baseline risk

# --- the contour: which (RR_EU, RR_UD) pairs explain rr away -----------------
bias_factor <- function(x, y) x * y / (x + y - 1)
contour_y   <- function(x, rr) rr * (x - 1) / (x - rr)   # asymptotes at x = rr and y = rr

# --- applied to the IPTW ATE -------------------------------------------------
# These three numbers are B6-03's output — primary.hr / hrLcl / hrUcl in this
# page's stats file — typed in so the block runs on its own. What the page
# shows is substituted at build time, so rerunning B6-03 moves these too.
hr <- 1.070253; lo <- 0.589014; hi <- 1.944676

rr <- hr_to_rr_common(hr)                  # event proportion > 0.15, square-root form
c(point = evalue_rr(rr),
  ci    = evalue_ci(hr_to_rr_common(lo), hr_to_rr_common(hi)))

Verified against R 4.6.0 with jsonlite 2.0.0. The E-value is closed form, so this page writes it out rather than installing a package. VanderWeele's EValue package does the same computation and draws bias plots; there is nothing wrong with using it, but writing the formula once is what makes visible what it is doing.

Judging whether a reported E-value is large or small

To evaluate that sentence in the discussion section, ask four questions:

  1. Which effect measure was it computed from, and was it converted? If the paper does not say, assume it was not, and discount the number accordingly.
  2. Were both E-values reported? Reporting only one, and having that one be the point estimate, states the conclusion more firmly than the data do.
  3. Against what benchmark? An E-value has no intrinsic scale. The useful yardstick is the study’s own measured covariates: if the strongest known risk factor in the model is weaker than the E-value, then believing an unmeasured factor is stronger still needs a reason. A study whose E-value falls below several of its measured covariate associations has effectively conceded fragility.
  4. How strong was the association to begin with? The E-value is a function of the risk ratio, not independent evidence. An E-value of 3.41 means an observed ratio of 2; an E-value of 5.45 means 3.

The fourth point deserves one more sentence. Because the E-value is a monotone function of the risk ratio, it contains no new information mathematically. Its entire value is communicative: it translates an abstract worry about residual confounding into a number that can be held up against clinical knowledge. Treating it as fresh evidence is the misuse.

Common misuse

MisuseWhy it is wrong
Feeding a hazard or odds ratio straight into the formulaThe formula takes a risk ratio. Skipping the conversion always inflates the E-value, making the finding look harder to overturn
Using the square-root form for a rare outcome, or RR = HR for a common oneThe two routes have opposite conditions; choosing wrongly biases in a known direction
Using a case-control study’s case proportion as the baseline riskThat proportion is set by the sampling design and is not a risk in any population
Reporting only the point estimate’s E-valueOverturning a conclusion does not require moving the point estimate to the null, only the interval far enough to touch it
Reading an interval E-value of 1 as robustnessThe opposite. It means zero confounding suffices, because the interval already covers the null
Saying “the E-value is large, so there is no unmeasured confounding”It is a threshold, not a test. It says how strong is enough, never whether anything that strong exists
Answering a selection bias or measurement error critique with an E-valueThe formula covers unmeasured confounding only; other biases need other quantitative bias analysis
Comparing E-values across studies as a measure of credibilityIt is a function of each study’s own risk ratio, so a larger effect gives a larger E-value regardless of design quality
Thinking about only one unmeasured confounderThe formula assumes a single U. Several individually modest ones can clear the threshold together
Choosing, after the fact, whichever effect estimate gives the nicest E-valueSelective reporting, exactly like choosing τ or a cut-off after seeing the data. Fix it in the methods

Where this page sits

Rerun every number on this page

This script depends on the stats files from B6-02, B6-03 and D2, so those three have to run first (alphabetical order already does this):

/opt/homebrew/bin/Rscript figures/scripts/B6-02-psm.R
/opt/homebrew/bin/Rscript figures/scripts/B6-03-iptw.R
/opt/homebrew/bin/Rscript figures/scripts/D2-case-control-infert.R
/opt/homebrew/bin/Rscript figures/scripts/B6-07-e-value.R

Read the figure

The answer comes from the same statistical output that produced this page's figures, not from a number typed in beside them.

The odds ratio in the first example is 4.150, with a 95% CI from 1.779 to 9.678. The paper reports only an E-value of 7.77. What is the reader not being told?

Show the answer and why

Correct answer: The E-value for the interval limit, 2.96: making this result compatible with the null takes less than half the strength the point estimate figure demands

The two E-values ask different questions. The point-estimate figure of 7.77 asks how strong confounding would have to be to move the effect back to the null. The interval figure of 2.96 asks how strong it would have to be to make this result compatible with the null, and that second question is the one about whether the conclusion can be overturned: overturning it does not require moving the point estimate to the null, only moving the interval far enough to touch it. The figure 1.78 is the lower limit itself, which the paper's table already carries, and an E-value is not a significance test. Reporting only the point-estimate figure is common, and it always makes a result look harder to overturn than it is.

In the second example, all seven interval E-values in the last column are identical and all sit at the minimum this scale can take. What does that minimum say?

Show the answer and why

Correct answer: 1.00 is the floor of this scale: every one of the seven intervals covers the null, so no unmeasured confounding at all is needed

The direction is easy to read backwards. A value of 1.00 does not mean that only very strong confounding could overturn the result; it means zero-strength confounding suffices, because every confidence interval already covers the null and the data are compatible with no effect. The figure 1.27 is the point-estimate column, which answers a different question and is not a rounding of anything. The figure 1.94 is the upper limit of the hazard ratio, and its distance from the null says nothing about robustness; what matters is whether the interval covers the null. The correct wording is that across every matching and weighting specification these data did not detect an association between storage duration and biochemical recurrence, so the sensitivity analysis has nothing here to protect.

The cohort in the second example has 287 complete cases and 47 events. This page converts the hazard ratio to a risk ratio with the square-root form rather than setting the two equal. Why?

Show the answer and why

Correct answer: Because the event proportion of 0.164 is above the conventional rarity threshold, so treating the hazard ratio as a risk ratio would overstate the effect

Which formula applies is decided by how common the outcome is, not by how far the effect sits from the null. With 47 events among 287 complete cases the event proportion is 0.164, above the conventional rarity threshold, so the square-root form is the correct route. The figure 1.070 is the hazard ratio itself, and its closeness to the null has no bearing on the choice of formula. The figure 1.048 is the result of the conversion rather than the reason for it, so using it as the justification puts the effect before the cause - and the claim about the only shrinking formula is wrong too, since the odds ratio formula also shrinks the value whenever the association runs upward.

For the IPTW ATE estimate, converting first and then computing gives a point-estimate E-value of 1.27. What comes out if the hazard ratio goes straight into the formula?

Show the answer and why

Correct answer: 1.34, larger than the correct figure: skipping the conversion always inflates the E-value, which makes the result look harder to overturn

The value 1.27 is the correct figure after conversion and 1.34 is the figure without it, and the direction of that gap is fixed: the square-root form always returns a risk ratio closer to the null than the hazard ratio, so skipping the conversion always returns a larger E-value and a result that looks harder to overturn. The margin is small here only because the hazard ratio is close to the null; the further from the null and the more common the outcome, the larger the error. The value 1.53 is the E-value of a different estimand, not a second way of computing this one, and 1.07 is the hazard ratio itself - an E-value is never equal to the effect size. The question to ask a paper is which effect measure the E-value was computed from, and whether it was converted to a risk ratio first.

Cases make up 33.5% of the sample in the first example. Can that proportion serve as the baseline risk in the odds-ratio-to-risk-ratio formula?

Show the answer and why

Correct answer: No. The case-to-control ratio is a design parameter the investigator chose, so a different sampling ratio gives a different value; the page uses the odds ratio 4.150 instead

A case-control study fixes the case-to-control ratio by design, so no proportion in the data is a risk in any population. The value 0.335 is that design parameter, and using it as a baseline risk is inventing data. The value 2.546 comes from a table of hypothetical baseline risks, which answers what the E-value would fall to if the baseline risk really were that high; it cannot be quoted as this study's risk ratio. Taking the rare-outcome approximation and setting the risk ratio to 4.150 is not a convenience but the most permissive choice available: with the association running upward, any baseline risk above zero makes the risk ratio smaller and the E-value smaller with it. So this is the largest defensible number, and if even it fails to convince, no other assumption will do better.

This page's reference table pairs two observed risk ratios with their E-values: an observed 2 pairs with 3.41, an observed 3 pairs with 5.45. A paper reports an E-value of 1.27 and nothing else. How should that number be understood?

Show the answer and why

Correct answer: Against the mapping between E-values and observed associations: it takes an observed 2 to reach 3.41, so the observed association behind 1.27 sits almost on top of the null

An E-value is a function of the observed risk ratio, and not a proportional one: an observed 2 maps to 3.41 and an observed 3 jumps to 5.45, because the curve climbs steeply near the null. So an E-value that reads as comfortably above 1 can sit behind a rather weak association - 1.27 is on the stretch closest to the null, and what it corresponds to is all but pinned to it. Reading by proportion therefore fails: the observed association rises by half between 2 and 3 while the E-value goes from 3.41 to 5.45, so a proportional reading systematically overstates what lies behind the number. Reading 1.27 as an effect size is the other common mistake - an E-value answers how strong unmeasured confounding would have to be to explain the result away, and it is never the association the study measured. Judging whether an E-value is large means asking whether any unmeasured variable in this setting could plausibly be associated this strongly with both the exposure and the outcome.

Sources and licences

This page is original writing

Report a content problem

The statistics on this site are written by AI and reviewed by AI; a human only spot-checks. What you can see may be what we cannot.

The more specific, the more fixable — e.g. which sentence disagrees with which textbook or paper.

Needed only if you want a reply; reports without it are still read.

Sent along with your report

These are attached automatically. You can drop any of them.