Chapter 18 Sensitivity Analysis for the Average Causal Effect with Unmeasured Confounding

Cornfield-type sensitivity analysis works best for binary outcomes on the risk ratio scale, conditional on the observed covariates. Although Ding and VanderWeele, (2016) also proposed Cornfield-type sensitivity analysis methods for the average causal effect, they are not general enough and are not convenient to apply. Below I give a more direct approach to sensitivity analysis based on the conditional expectations of the potential outcomes. The advantage of this approach is that it can deal with commonly used estimators for the average causal effect under the sensitivity analysis framework. The idea appeared in the early work of Robins, (1999) and Scharfstein et al., (1999). This chapter is based on Lu and Ding, (2023)’s recent formulation.

The approach is closely related to the idea of deriving worse-case bounds on the average potential outcomes. I will first review the simpler idea of bounds, and then extend the approach to sensitivity analysis.

92 Introduction

Recall the canonical setup of an observational study with \{Z_{i},X_{i},Y_{i}(1),Y_{i}(0)\}_{i=1}^{n}\stackrel{{\scriptstyle\textup{IID}}}{{\sim}}\{Z,X,Y(1),Y(0)\} and focus on the average causal effect

\tau=E\{Y(1)-Y(0)\}.

It decomposes to

\displaystyle\tau \displaystyle= \displaystyle\left[E(Y\mid Z=1)\textup{pr}(Z=1)+E\{Y(1)\mid Z=0\}\textup{pr}(Z=0)\right]
\displaystyle-\left[E\{Y(0)\mid Z=1\}\textup{pr}(Z=1)+E(Y\mid Z=0)\textup{pr}(Z=0)\right].

So the fundamental difficulty is to estimate the counterfactual means

E\{Y(1)\mid Z=0\},\quad\quad E\{Y(0)\mid Z=1\}.

There are in general two extreme strategies to estimate them.

We have discussed the first strategy in Part III, which relies on ignorability. Assuming

\displaystyle E\{Y(1)\mid Z=1,X\} \displaystyle= \displaystyle E\{Y(1)\mid Z=0,X\},
\displaystyle E\{Y(0)\mid Z=1,X\} \displaystyle= \displaystyle E\{Y(0)\mid Z=0,X\},

we can identify the counterfactual means by the observables:

E\{Y(1)\mid Z=0\}=E\left\{E(Y\mid Z=1,X)\mid Z=0\right\}

and, similarly,

E\{Y(0)\mid Z=1\}=E\left\{E(Y\mid Z=0,X)\mid Z=1\right\}.

The second strategy in the next section assumes nothing except that the outcomes are bounded between \underline{y} and \overline{y}. This is natural for binary outcomes with \underline{y}=0 and \overline{y}=1. With this assumption, the two counterfactual means are also bounded between \underline{y} and \overline{y}, which implies the worst-case bounds on \tau. Table 7 illustrates the basic idea and Chapter 93 below reviews this strategy in more detail.

Table 7: Science Table with bounded outcome [\underline{y},\overline{y}], where \underline{y} and \overline{y} are two constants
Z Y(1) Y(0) Lower Y(1) Upper Y(1) Lower Y(0) Upper Y(0)
1 Y_{1}(1) ? Y_{1}(1) Y_{1}(1) \underline{y} \overline{y}
\vdots \vdots \vdots \vdots \vdots \vdots \vdots
1 Y_{n_{1}}(1) ? Y_{n_{1}}(1) Y_{n_{1}}(1) \underline{y} \overline{y}
0 ? Y_{n_{1}+1}(0) \underline{y} \overline{y} Y_{n_{1}+1}(0) Y_{n_{1}+1}(0)
\vdots \vdots \vdots \vdots \vdots \vdots \vdots
0 ? Y_{n}(0) \underline{y} \overline{y} Y_{n}(0) Y_{n}(0)

93 Manski-type worse-case bounds on the average causal effect without assumptions

Assume that the outcome is bounded between \underline{y} and \overline{y}. From the decomposition

E\{Y(1)\}=E\{Y(1)\mid Z=1\}\textup{pr}(Z=1)+E\{Y(1)\mid Z=0\}\textup{pr}(Z=0),

we can derive that E\{Y(1)\} has lower bound

E\{Y\mid Z=1\}\textup{pr}(Z=1)+\underline{y}\textup{pr}(Z=0)

and upper bound

E\{Y\mid Z=1\}\textup{pr}(Z=1)+\overline{y}\textup{pr}(Z=0).

Similarly, from the decomposition

E\{Y(0)\}=E\{Y(0)\mid Z=1\}\textup{pr}(Z=1)+E\{Y(0)\mid Z=0\}\textup{pr}(Z=0),

we can derive that E\{Y(0)\} has lower bound

\underline{y}\textup{pr}(Z=1)+E\{Y\mid Z=0\}\textup{pr}(Z=0)

and upper bound

\overline{y}\textup{pr}(Z=1)+E\{Y\mid Z=0\}\textup{pr}(Z=0).

Combining these bounds, we can derive that the average causal effect \tau=E\{Y(1)\}-E\{Y(0)\} has the lower bound

E\{Y\mid Z=1\}\textup{pr}(Z=1)+\underline{y}\textup{pr}(Z=0)-\overline{y}\textup{pr}(Z=1)-E\{Y\mid Z=0\}\textup{pr}(Z=0)

and the upper bound

E\{Y\mid Z=1\}\textup{pr}(Z=1)+\overline{y}\textup{pr}(Z=0)-\underline{y}\textup{pr}(Z=1)-E\{Y\mid Z=0\}\textup{pr}(Z=0).

The length of the bounds is \overline{y}-\underline{y}. The bounds are not informative but are better than the a priori bounds [\underline{y}-\overline{y},\overline{y}-\underline{y}] with length 2(\overline{y}-\underline{y}). Without further assumptions, the observed data distribution does not uniquely determine \tau. In this case, we say that \tau is partially identified, with the formal definition below.

Definition 18.1 (partial identification)

A parameter \theta is partially identified if the observed data distribution is compatible with multiple values of \theta.

Compare Definitions 10.1 and 18.1. If the parameter \theta is uniquely determined by the observed data distribution, then it is identifiable; otherwise, it is only partially identifiable. Therefore, \tau is identifiable with the ignorability assumption, but only partially identifiable without the ignorability assumption.

Cochran, (1953) used the idea of worse-case bounds in surveys with missing data but abandoned the idea because it often gives very conservative results. Similarly, the above worst-case bounds on \tau are often uninteresting from a practical perspective because they often cover 0. Moreover, this strategy does not apply to the settings with unbounded outcomes.

Manski applied the idea to causal inference (Manski,, 1990) and many other econometric models (Manski,, 2003). This idea of bounding causal parameters with minimal assumptions is powerful when coupled with other qualitative assumptions. Manski, (2003) surveyed many strategies. For instance, we may believe that the treatment does not harm any units, so the monotonicity assumption holds: Y(1)\geq Y(0). Then the lower bound on \tau is zero but the upper bound is unchanged. Another type of assumption is Z=I\{Y(1)\geq Y(0)\}, that is, the treatment selection is based on the difference between the latent potential outcomes. This assumption can also improve the bounds on \tau. A more detailed discussion of this approach is beyond the scope of this book.

94 Sensitivity analysis for the average causal effect

The first strategy is optimistic and assumes that the potential outcomes do not differ across treatment and control groups, conditional on the observed covariates. The second strategy is pessimistic and does not infer the counterfactual means based on the observed data at all. The following strategy is in-between.

94.1 Identification formulas

Define

\displaystyle\frac{E\{Y(1)\mid Z=1,X\}}{E\{Y(1)\mid Z=0,X\}}=\varepsilon_{1}(X),
\displaystyle\frac{E\{Y(0)\mid Z=1,X\}}{E\{Y(0)\mid Z=0,X\}}=\varepsilon_{0}(X),

which are the sensitivity parameters. For simplicity, we can further assume that they are constant independent of X. In practice, we need to fix them or vary them in a pre-specified range. Recall that \mu_{1}(X)=E(Y\mid Z=1,X) and \mu_{0}(X)=E(Y\mid Z=0,X) are the conditional mean functions of the observed outcomes under treatment and control, respectively. We can identify the two counterfactual means and the average causal effect as follows.

Theorem 18.1

With known \varepsilon_{1}(X) and \varepsilon_{0}(X), we have

\displaystyle E\{Y(1)\mid Z=0\} \displaystyle= \displaystyle E\left\{\mu_{1}(X)/\varepsilon_{1}(X)\mid Z=0\right\},
\displaystyle E\{Y(0)\mid Z=1\} \displaystyle= \displaystyle E\left\{\mu_{0}(X)\varepsilon_{0}(X)\mid Z=1\right\}

and therefore

\displaystyle\tau \displaystyle= \displaystyle E\{ZY+(1-Z)\mu_{1}(X)/\varepsilon_{1}(X)\} (90)
\displaystyle-E\{Z\mu_{0}(X)\varepsilon_{0}(X)+(1-Z)Y\}
\displaystyle= \displaystyle E\{Z\mu_{1}(X)+(1-Z)\mu_{1}(X)/\varepsilon_{1}(X)\}
\displaystyle-E\{Z\mu_{0}(X)\varepsilon_{0}(X)+(1-Z)\mu_{0}(X)\}. (91)

I leave the proof of Theorem 18.1 to Problem 18.1. With the fitted outcome model, (90) and (91) motivate the following predictive and projective estimators for \tau:

\displaystyle\hat{\tau}^{\textup{pred}} \displaystyle= \displaystyle\left\{n^{-1}\sum_{i=1}^{n}Z_{i}Y_{i}+n^{-1}\sum_{i=1}^{n}(1-Z_{i})\hat{\mu}_{1}(X_{i})/\varepsilon_{1}(X_{i})\right\}
\displaystyle-\left\{n^{-1}\sum_{i=1}^{n}Z_{i}\hat{\mu}_{0}(X_{i})\varepsilon_{0}(X_{i})+n^{-1}\sum_{i=1}^{n}(1-Z_{i})Y_{i}\right\},

and

\displaystyle\hat{\tau}^{\textup{proj}} \displaystyle= \displaystyle\left\{n^{-1}\sum_{i=1}^{n}Z_{i}\hat{\mu}_{1}(X_{i})+n^{-1}\sum_{i=1}^{n}(1-Z_{i})\hat{\mu}_{1}(X_{i})/\varepsilon_{1}(X_{i})\right\}
\displaystyle-\left\{n^{-1}\sum_{i=1}^{n}Z_{i}\hat{\mu}_{0}(X_{i})\varepsilon_{0}(X_{i})+n^{-1}\sum_{i=1}^{n}(1-Z_{i})\hat{\mu}_{0}(X_{i})\right\}.

The terminology “predictive” and “projective” is from the survey sampling literature (Firth and Bennett,, 1998; Ding and Li,, 2018); see also Chapter 30.2.2. The estimators \hat{\tau}^{\textup{pred}} and \hat{\tau}^{\textup{proj}} differ slightly: the former uses the observed outcomes when available, whereas the latter replaces the observed outcomes with the fitted values.

More interesting, we can also identify \tau by an inverse probability weighting formula.

Theorem 18.2

With known \varepsilon_{1}(X) and \varepsilon_{0}(X), we have

\displaystyle E\{Y(1)\}=E\left\{w_{1}(X)\frac{Z}{e(X)}Y\right\},\quad E\{Y(0)\}=E\left\{w_{0}(X)\frac{1-Z}{1-e(X)}Y\right\},

where

w_{1}(X)=e(X)+\{1-e(X)\}/\varepsilon_{1}(X),\quad w_{0}(X)=e(X)\varepsilon_{0}(X)+1-e(X).

I leave the proof of Theorem 18.2 to Problem 18.2. Theorem 18.2 modifies the classic IPW formulas with two extra factors w_{1}(X) and w_{0}(X), which depend on both the propensity score and the sensitivity parameters. With the fitted propensity scores, Theorem 18.2 motivates the following estimators for \tau:

\displaystyle\hat{\tau}^{\textup{ht}} \displaystyle= \displaystyle n^{-1}\sum_{i=1}^{n}\frac{\{\hat{e}(X_{i})\varepsilon_{1}(X_{i})+1-\hat{e}(X_{i})\}Z_{i}Y_{i}}{\varepsilon_{1}(X_{i})\hat{e}(X_{i})}
\displaystyle-n^{-1}\sum_{i=1}^{n}\frac{\{\hat{e}(X_{i})\varepsilon_{0}(X_{i})+1-\hat{e}(X_{i})\}(1-Z_{i})Y_{i}}{1-\hat{e}(X_{i})}

and

\displaystyle\hat{\tau}^{\textup{haj}} \displaystyle= \displaystyle\sum_{i=1}^{n}\frac{\{\hat{e}(X_{i})\varepsilon_{1}(X_{i})+1-\hat{e}(X_{i})\}Z_{i}Y_{i}}{\varepsilon_{1}(X_{i})\hat{e}(X_{i})}\Big/\sum_{i=1}^{n}\frac{Z_{i}}{\hat{e}(X_{i})}
\displaystyle-n^{-1}\sum_{i=1}^{n}\frac{\{\hat{e}(X_{i})\varepsilon_{0}(X_{i})+1-\hat{e}(X_{i})\}(1-Z_{i})Y_{i}}{1-\hat{e}(X_{i})}\Big/\sum_{i=1}^{n}\frac{1-Z_{i}}{1-\hat{e}(X_{i})}.

More interestingly, with fitted propensity score and outcome models, the following estimator for \tau is doubly robust:

\displaystyle\hat{\tau}^{\textup{ht}}=\hat{\tau}^{\textup{ht}}-n^{-1}\sum_{i=1}^{n}\{Z_{i}-\hat{e}(X_{i})\}\left\{\frac{\hat{\mu}_{1}(X_{i})}{\hat{e}(X_{i})\varepsilon_{1}(X_{i})}+\frac{\hat{\mu}_{0}(X_{i})\varepsilon_{0}(X_{i})}{1-\hat{e}(X_{i})}\right\}.

That is, with known \varepsilon_{1}(X_{i}) and \varepsilon_{0}(X_{i}), the estimator \hat{\tau}^{\textup{dr}} is consistent for \tau if either the propensity score model or the outcome model is correctly specified. We can use the bootstrap to approximate the variance of the above estimators. See Lu and Ding, (2023) for technical details.

When \varepsilon_{1}(X_{i})=\varepsilon_{0}(X_{i})=1, the above estimators reduce to the predictive estimator, IPW estimator, and the doubly robust estimators introduced in Part III.

94.2 Example
94.2.1 R functions for sensitivity analysis

The following R function can compute the point estimates for sensitivity analysis.

OS_est_sa = function(z, y, x, out.family = gaussian,
truncps = c(0, 1), e1 = 1, e0 = 1)
{
## fitted propensity score
pscore = glm(z ~ x, family = binomial)$fitted.values
pscore = pmax(truncps[1], pmin(truncps[2], pscore))
## fitted potential outcomes
outcome1 = glm(y ~ x, weights = z,
family = out.family)$fitted.values
outcome0 = glm(y ~ x, weights = (1 - z),
family = out.family)$fitted.values
## outcome regression estimator
ace.reg = mean(z*y) + mean((1-z)*outcome1/e1) -
mean(z*outcome0*e0) - mean((1-z)*y)
## IPW estimators
w1 = pscore + (1-pscore)/e1
w0 = pscore*e0 + (1-pscore)
ace.ipw0 = mean(z*y*w1/pscore) -
mean((1 - z)*y*w0/(1 - pscore))
ace.ipw = mean(z*y*w1/pscore)/mean(z/pscore) -
mean((1 - z)*y*w0/(1 - pscore))/mean((1 - z)/(1 - pscore))
## doubly robust estimator
aug = outcome1/pscore/e1 + outcome0*e0/(1-pscore)
ace.dr = ace.ipw0 + mean((z-pscore)*aug)
return(c(ace.reg, ace.ipw0, ace.ipw, ace.dr))
}

I relegate the calculation of the standard errors to Problem 18.3.

94.2.2 Revisit Example 10.3

With

\varepsilon_{1}(X)=\varepsilon_{0}(X)\in\{1/2,1/1.7,1/1.5,1/1.3,1,1.3,1.5,1.7,2\},

we obtain an array of doubly robust estimates of \tau based on the following R code:

> nhanes_bmi = read.csv("nhanes_bmi.csv")[, -1]
> z = nhanes_bmi$School_meal
> y = nhanes_bmi$BMI
> x = as.matrix(nhanes_bmi[, -c(1, 2)])
> x = scale(x)
>
>
> E1 = c(1/2, 1/1.7, 1/1.5, 1/1.3, 1, 1.3, 1.5, 1.7, 2)
> E0 = c(1/2, 1/1.7, 1/1.5, 1/1.3, 1, 1.3, 1.5, 1.7, 2)
> EST = outer(E1, E0)
> ll1 = length(E1)
> ll0 = length(E0)
> for(i in 1:ll1)
+ for(j in 1:ll0)
+ EST[i, j] = OS_est_sa(z, y, x, e1 = E1[i], e0 = E0[j])[4]
Table 8: Sensitivity analysis for the average causal effect
1/2 1/1.7 1/1.5 1/1.3 1 1.3 1.5 1.7 2
1/2 11.62 10.44 9.40 8.03 4.96 0.97 -1.69 -4.35 -8.34
1/1.7 9.22 8.05 7.00 5.64 2.57 -1.42 -4.08 -6.75 -10.74
1/1.5 7.63 6.45 5.41 4.05 0.97 -3.02 -5.68 -8.34 -12.33
1/1.3 6.03 4.86 3.81 2.45 -0.62 -4.61 -7.27 -9.94 -13.93
1 3.64 2.47 1.42 0.06 -3.01 -7.01 -9.67 -12.33 -16.32
1.3 1.80 0.63 -0.42 -1.78 -4.85 -8.85 -11.51 -14.17 -18.16
1.5 0.98 -0.19 -1.24 -2.60 -5.67 -9.66 -12.33 -14.99 -18.98
1.7 0.36 -0.82 -1.86 -3.23 -6.30 -10.29 -12.95 -15.61 -19.60
2 -0.35 -1.52 -2.57 -3.93 -7.00 -10.99 -13.65 -16.32 -20.31

Table 8 presents the point estimates. The signs of the estimates are not sensitive to sensitivity parameters larger than 1, but they are quite sensitive to sensitivity parameters smaller than 1. When the participants of the meal plan tend to have higher BMI (that is, \varepsilon_{1}(X)>1 and \varepsilon_{0}(X)>1), the average causal effect of the meal plan on BMI is negative. However, this conclusion can be quite sensitive if the participants of the meal plan tend to have lower BMI.

95 Homework Problems

18.1 Proof of Theorem 18.1

Prove Theorem 18.1.

18.2 Proof of Theorem 18.2

Prove Theorem 18.2.

18.3 Standard errors in sensitivity analysis

Chapter 94.2 only presents the point estimates. Report the corresponding bootstrap standard errors.

18.4 Sensitivity analysis for the average causal effect on the treated units \tau_{\textsc{T}}

This problem extends Chapter 13 to allow for unmeasured confounding for estimating

\tau_{\textsc{T}}=E\{Y(1)-Y(0)\mid Z=1\}=E(Y\mid Z=1)-E\{Y(0)\mid Z=1\}.

We can easily estimate E(Y\mid Z=1) by the sample moment, \hat{\mu}_{\textsc{t}1}=\sum_{i=1}^{n}Z_{i}Y_{i}/\sum_{i=1}^{n}Z_{i}. The only counterfactual term is E\{Y(0)\mid Z=1\}. Therefore, we only need the sensitivity parameter \varepsilon_{0}(X). We have the following two identification formulas with a known \varepsilon_{0}(X).

Theorem 18.3

With known \varepsilon_{0}(X), we have

\displaystyle E\{Y(0)\mid Z=1\} \displaystyle= \displaystyle E\left\{Z\mu_{0}(X)\varepsilon_{0}(X)\right\}/e
\displaystyle= \displaystyle E\left\{e(X)\varepsilon_{0}(X)\frac{1-Z}{1-e(X)}Y\right\}/e,

where e=\textup{pr}(Z=1)

Prove Theorem 18.3.

Remark: Theorem 18.3 motivates using \hat{\tau}_{\textsc{t}}^{*}=\hat{\mu}_{\textsc{t}1}-\hat{\mu}_{\textsc{t}0}^{*} to estimate \tau_{\textsc{t}}, where

\displaystyle\hat{\mu}_{\textsc{t}0}^{\text{reg}} \displaystyle= \displaystyle n_{1}^{-1}\sum_{i=1}^{n}Z_{i}\varepsilon_{0}(X_{i})\hat{\mu}_{0}(X_{i}),
\displaystyle\hat{\mu}_{\textsc{t}0}^{\text{ht}} \displaystyle= \displaystyle n_{1}^{-1}\sum_{i=1}^{n}\varepsilon_{0}(X_{i})\hat{o}(X_{i})(1-Z_{i})Y_{i},
\displaystyle\hat{\mu}_{\textsc{t}0}^{\text{haj}} \displaystyle= \displaystyle\sum_{i=1}^{n}\varepsilon_{0}(X_{i})\hat{o}(X_{i})(1-Z_{i})Y_{i}/\sum_{i=1}^{n}\hat{o}(X_{i})(1-Z_{i}),

with \hat{o}(X_{i})=\hat{e}(X_{i})/\{1-\hat{e}(X_{i})\} being the estimated conditional odds of the treatment given the observed covariates. Moreover, we can construct the doubly robust estimator \hat{\tau}_{\textsc{t}}^{\text{dr}}=\hat{\mu}_{\textsc{t}1}-\hat{\mu}_{\textsc{t}0}^{\text{dr}} for \tau_{\textsc{t}}, where

\hat{\mu}_{\textsc{t}0}^{\text{dr}}=\hat{\mu}_{\textsc{t}0}^{\text{ht}}-n_{1}^{-1}\sum_{i=1}^{n}\varepsilon_{0}(X_{i})\frac{\hat{e}(X_{i})-Z}{1-\hat{e}(X_{i})}\hat{\mu}_{0}(X_{i}).

Lu and Ding, (2023) provide more details.

18.5 R code

Implement the estimators in Problem 18.4. Analyze the data used in Chapter 94.2.

18.6 Recommended reading

Rosenbaum and Rubin, 1983a () and Imbens, (2003) are two classic papers on sensitivity analysis which, however, involve more complicated procedures.

本书:A First Course in Causal Inference,作者 Peng Ding。原文:arXiv:2305.18793v2,按 CC BY 4.0 许可发布。本站(yuanens.com)把 arXiv 网页版改成分章的纯 HTML,把公式渲染成图片,方便在 Kindle 等电子书阅读器上看,内容没有改动。转换难免有错,以原文为准。本站与作者和出版社无关。