Tutorials › Causal Inference › Bias-Adjusted Estimates from Partial R-Squared Values

Sensitivity to Unmeasured Confounding · Tutorial 878 of 972

Bias-Adjusted Estimates from Partial R-Squared Values

Learn to translate a hypothesized unmeasured confounder’s partial R-squared values into an adjusted treatment estimate and uncertainty interval.

Advanced 11 min read

What You'll Learn

  • Define the treatment and outcome partial R-squared values used in the adjustment.
  • Derive the magnitude and direction of omitted-variable bias from those values.
  • Calculate an adjusted treatment estimate for a specified confounding direction.
  • Adjust an OLS standard error and confidence interval for an added scalar confounder.
  • Identify the assumptions required for these adjustments and their causal interpretation.

From Confounding Strength to an Adjusted Estimate

A sensitivity analysis becomes more interpretable when its assumptions can be expressed on the scale of the treatment-effect estimate. Suppose a linear regression estimates a treatment coefficient after adjustment for measured covariates, but an unmeasured confounder may remain. Partial R-squared values describe how strongly that confounder would relate to treatment and outcome after the relevant measured variables have already been controlled. This tutorial derives how those two quantities determine the size of the omitted-variable bias and how adding the confounder would change the conventional OLS standard error.

The calculations are not a way to discover the unknown confounder’s actual strength. They answer a conditional question: if an unmeasured confounder had specified partial R-squared values and a specified direction of association, how would the estimate and its uncertainty change? The resulting estimate is a sensitivity-adjusted regression coefficient. It has a causal interpretation only when the causal assumptions needed for that interpretation also hold.

Model and Partial R-Squared Values

Let \(Y\) be a continuous outcome, \(D\) a treatment, \(X\) the measured covariates included in the regression, and \(Z\) one omitted scalar confounder. Consider two nested linear models fitted to the same \(n\) observations. The reduced model adjusts for \(X\) but omits \(Z\); the full model also adjusts for \(Z\).

$$ Y_i = \tau D_i + X_i^\top \beta + \varepsilon_i \qquad\text{(reduced model)} $$
$$ Y_i = \tau_Z D_i + X_i^\top \beta_Z + \gamma Z_i + \varepsilon_{Zi} \qquad\text{(full model)} $$

The coefficient \(\hat{\tau}\) is the reduced-model treatment estimate, and \(SE(\hat{\tau})\) is its conventional OLS standard error. Write \(df\) for the reduced model’s residual degrees of freedom. The quantities below are defined by comparing nested regressions on the same observations.

Definition: Let \(R_D = R^2_{D\sim Z\mid X}\) be the partial R-squared for \(Z\) with treatment: the fraction of the residual sum of squares from regressing \(D\) on \(X\) that is explained by adding \(Z\). Let \(R_Y = R^2_{Y\sim Z\mid D,X}\) be the partial R-squared for \(Z\) with outcome: the fraction of the residual sum of squares from regressing \(Y\) on \(D\) and \(X\) that is explained by adding \(Z\). Both lie between 0 and 1.

These are conditional strengths, not ordinary correlations between the raw variables. In particular, \(R_D\) measures the treatment association left after accounting for \(X\), while \(R_Y\) measures the outcome association left after accounting for both \(D\) and \(X\). The latter is conditional on treatment because it is the outcome association relevant to the omitted-variable-bias calculation.

For the formulas here, assume the regressions are linear and nested, use the same observations, and include the same measured covariates. The confounder is one scalar variable added to the reduced model. To use the adjusted standard error and usual \(t\)-based interval, also assume the classical homoskedastic linear-model conditions, including independent errors with constant variance; normal errors give exact finite-sample \(t\) inference. A sensitivity calculation can be performed without asserting that these assumptions are true, but its standard error and interval interpretation depend on them.

Bias Adjustment Formula

The partial R-squared values determine the magnitude of the coefficient change, but not its direction. The direction must be specified separately. For a scalar \(Z\), let \(s\) equal the sign of the product of (i) the coefficient of \(Z\) in the regression of \(D\) on \(X,Z\) and (ii) the coefficient of \(Z\) in the full outcome regression. Thus \(s=1\) means the two conditional associations have a positive product; \(s=-1\) means it is negative. If either association is zero, the corresponding bias is zero.

Theorem: Under the nested linear regression setup, the magnitude of the difference between the reduced and full treatment coefficients is $$ \left|\hat{\tau}-\hat{\tau}_Z\right| = SE(\hat{\tau}) \sqrt{\frac{df\,R_D R_Y}{1-R_D}}. $$ With the sign convention above, the sensitivity-adjusted estimate for including \(Z\) is $$ \hat{\tau}_Z = \hat{\tau} - s\,SE(\hat{\tau}) \sqrt{\frac{df\,R_D R_Y}{1-R_D}}. $$

The adjustment is larger when the confounder explains more residual variation in both treatment and outcome. The denominator \(1-R_D\) accounts for the fact that adding a variable that predicts treatment also reduces the residual variation in treatment available to estimate its coefficient. The formula requires \(R_D<1\); if \(R_D=1\), treatment has no residual variation after adding \(Z\) and \(X\), so its coefficient is not separately identified in the full model.

Worked Example: Adjusting an Estimate for Positive Confounding

Suppose a hypothetical study estimates that a treatment reduces systolic blood pressure by \(2.4\) mmHg after adjustment for measured covariates: \(\hat{\tau}=-2.4\) mmHg, with \(SE(\hat{\tau})=0.60\) mmHg and \(df=100\). A sensitivity scenario assigns \(R_D=0.10\) and \(R_Y=0.08\), and assumes positive confounding, \(s=1\). The specified positive direction means the reduced estimate is biased upward relative to the full-model coefficient.

First calculate the bias magnitude:

$$ 0.60\sqrt{\frac{100(0.10)(0.08)}{1-0.10}} = 0.60\sqrt{0.8889} = 0.566\text{ mmHg}. $$

Then subtract this positive bias from the reduced estimate:

$$ \hat{\tau}_Z = -2.4 - 0.566 = -2.966\text{ mmHg}. $$

Under this scenario, adjustment makes the estimated reduction larger in magnitude: the hypothetical full-model coefficient is about \(2.97\) mmHg lower, rather than \(2.4\) mmHg lower. This is a scenario-based calculation, not evidence that the confounder actually has these strengths or direction.

Why the Bias Formula Holds

A short derivation shows how the two partial R-squared values combine. Residualize variables with respect to \(X\), and let \(SS_{D\mid X}\) denote the residual sum of squares for treatment after that residualization. Let \(q\) be the coefficient of \(D\) in the regression of \(Z\) on \(D,X\). Adding \(Z\) to the outcome regression changes the treatment coefficient by \(\gamma q\), where \(\gamma\) is the coefficient of \(Z\) in the full outcome regression. This is the omitted-variable-bias identity: omitting \(Z\) changes the treatment coefficient by the outcome association with \(Z\), multiplied by the conditional association between \(Z\) and treatment.

The partial R-squared for treatment implies \(q^2=R_D SS_{Z\mid X}/SS_{D\mid X}\). The partial R-squared for outcome implies \(\gamma^2=R_Y\,RSS_{\mathrm{red}}/SS_{Z\mid D,X}\), where \(RSS_{\mathrm{red}}\) is the reduced-model residual sum of squares. Because the residual sum of squares for \(Z\) falls by the factor \(1-R_D\) when treatment is added after \(X\), \(SS_{Z\mid D,X}=SS_{Z\mid X}(1-R_D)\). Multiplying the squared expressions gives:

$$ (\gamma q)^2 = \frac{R_D R_Y\,RSS_{\mathrm{red}}} {SS_{D\mid X}(1-R_D)}. $$

For conventional OLS, \(SE(\hat{\tau})^2=s_{\mathrm{red}}^2/SS_{D\mid X}\), with \(s_{\mathrm{red}}^2=RSS_{\mathrm{red}}/df\). Substituting \(RSS_{\mathrm{red}}=df\,s_{\mathrm{red}}^2\) into the preceding expression yields:

$$ (\gamma q)^2 = SE(\hat{\tau})^2 \frac{df\,R_D R_Y}{1-R_D}. $$

Taking the square root gives the stated bias magnitude. The sign comes from the sign of \(\gamma q\), which is determined by the conditional association directions, not by either R-squared alone.

Adjusting the Standard Error and Interval

Adding \(Z\) changes uncertainty for two reasons. The residual sum of squares generally falls when the outcome regression includes \(Z\), while the residual variation in treatment also falls when \(Z\) predicts treatment. In addition, the full model uses one more degree of freedom. For a scalar confounder, these changes give the following relationship between the conventional OLS standard errors.

Result: Under the stated classical OLS conditions, the full-model standard error for the treatment coefficient is $$ SE(\hat{\tau}_Z) = SE(\hat{\tau}) \sqrt{ \frac{1-R_Y}{1-R_D} \frac{df}{df-1} }. $$ The full model has \(df-1\) residual degrees of freedom.

To see the result, the full-model residual sum of squares is \(RSS_{\mathrm{red}}(1-R_Y)\), and the treatment residual sum of squares after controlling for \(X,Z\) is \(SS_{D\mid X}(1-R_D)\). The full-model residual variance divides its residual sum of squares by \(df-1\), whereas the reduced-model residual variance divides by \(df\). Combining these quantities in the OLS standard-error formula gives the displayed ratio.

A conventional two-sided \(100(1-\alpha)\%\) interval after adjustment is therefore \(\hat{\tau}_Z \pm t_{1-\alpha/2,df-1}SE(\hat{\tau}_Z)\). Its interpretation is conditional on the assumed confounder strengths, direction, model, and inferential assumptions. It is not an interval that accounts for uncertainty about which sensitivity scenario is correct.

Worked Example: Adjusting the Standard Error and Confidence Interval

Continue the hypothetical blood-pressure example. The scenario has \(R_Y=0.08\), \(R_D=0.10\), and \(df=100\). The adjusted estimate was \(-2.966\) mmHg. The adjusted standard error is:

$$ 0.60 \sqrt{ \frac{1-0.08}{1-0.10} \frac{100}{99} } = 0.60\sqrt{1.0337} = 0.610\text{ mmHg}. $$

Using a two-sided 95% interval and \(t_{0.975,99}\approx1.984\), the margin of error is \(1.984(0.610)=1.210\) mmHg. Thus the adjusted interval is:

$$ -2.966 \pm 1.210 = [-4.176,\,-1.756]\text{ mmHg}. $$

Under this specified scenario and the classical model assumptions, the interval estimates a mean treatment-associated reduction between about \(1.76\) and \(4.18\) mmHg. The 95% describes the long-run coverage of the procedure under the model; it does not mean there is a 95% probability that this fixed scenario-specific coefficient lies in this particular interval.

Worked Example: Negative Confounding Moves the Estimate Toward Zero

Consider a separate hypothetical analysis of treatment effects on symptom duration, measured in days. The reduced estimate is \(\hat{\tau}=-1.5\) days, with \(SE(\hat{\tau})=0.40\) days and \(df=80\). Suppose \(R_D=0.20\), \(R_Y=0.05\), and the assumed confounding direction is negative, so \(s=-1\).

The bias magnitude is:

$$ 0.40\sqrt{\frac{80(0.20)(0.05)}{1-0.20}} = 0.40\sqrt{1} = 0.40\text{ days}. $$

The adjusted coefficient is \(\hat{\tau}_Z=-1.5-(-1)(0.40)=-1.10\) days. Thus, under this direction, the reduced estimate was more negative than the full-model estimate; adjustment moves the estimate toward zero. The adjusted standard error is:

$$ 0.40\sqrt{\frac{0.95}{0.80}\frac{80}{79}} = 0.439\text{ days}. $$

This example shows why the direction must be stated as well as the two partial R-squared values. The same values of \(R_D\) and \(R_Y\), with the opposite sign assumption, would adjust the estimate to \(-1.90\) days instead.

Interpreting Scenarios and Avoiding Overstatement

A useful sensitivity analysis reports the assumed \(R_D\), \(R_Y\), and direction alongside the adjusted estimate and interval. Readers can then see whether the conclusion depends on a relatively weak or strong confounding scenario. The partial R-squared values quantify conditional predictive strength in the specified linear regressions; they do not, on their own, establish that \(Z\) is a confounder, identify its substantive meaning, or show that measured covariates have controlled all other sources of bias.

The adjustment is also tied to a particular model. Nonlinearity, treatment-effect heterogeneity, interactions involving \(Z\), different analysis samples, or a non-scalar omitted-variable block require care rather than automatic use of the scalar formulas. In particular, a conventional OLS standard-error adjustment is not automatically valid for heteroskedasticity-robust, clustered, or other nonclassical standard errors.

  • Mistake: treating partial R-squared values as signed. Both are nonnegative, so they cannot identify whether adjustment raises or lowers the estimate. Correction: state the assumed confounding direction and apply its sign to the bias magnitude.
  • Mistake: subtracting the bias magnitude in every case. This is only right when \(s=1\). Correction: use \(\hat{\tau}_Z=\hat{\tau}-s\,|\text{bias}|\); when \(s=-1\), the adjustment adds the magnitude.
  • Mistake: interpreting an adjusted regression coefficient as automatically causal. The algebra describes a regression adjustment, not the truth of causal assumptions. Correction: interpret it causally only if the full model and design justify that interpretation.
  • Mistake: reporting an adjusted estimate but leaving uncertainty unchanged. Adding \(Z\) may alter both residual outcome variation and residual treatment variation. Correction: when classical OLS assumptions apply, use the standard-error adjustment as well.
Key takeaway: Given \(R_D\), \(R_Y\), a direction \(s\), and the reduced-model estimate and standard error, the omitted-variable adjustment has magnitude \(SE(\hat{\tau})\sqrt{dfR_D R_Y/(1-R_D)}\). Under classical OLS assumptions, the same partial R-squared values also determine the full-model standard-error adjustment.

Check Your Understanding

Work through these questions using the formulas and assumptions above.

  1. In your own words, distinguish \(R_D\) from \(R_Y\). Which regression variables are conditioned on in each?
  2. If \(R_D=0\) or \(R_Y=0\), what does the bias formula imply, and why is that reasonable?
  3. A scenario specifies \(R_D\) and \(R_Y\) but not the direction \(s\). What can be calculated, and what remains undetermined?
  4. Why does the standard-error adjustment use \(df/(df-1)\) for a scalar added confounder?
  5. What additional assumptions are needed before interpreting the adjusted coefficient as a causal treatment effect?
Clinical Biostats