通常教科书都会告诉我们不要去控制 (conditioning)、调整 (adjust) 或匹配 (matching) 中间变量,因为考虑到它是其 parent 与某个 confounder 的 collider,那样会造成它与 confounder 成立虚假关系,即在暴露与结局的关系中造成冲撞分层偏倚 (collider stratification bias),不过在另一方面,对它的控制也有助于降低混杂偏倚 (confounding bias) 的水平,在两方都是有偏估计的情况下,可以根据偏倚水平作出权衡。

今天看到的一篇文章分别给出了暴露对结局的总效应在控制与不控制中间变量的情形下的 OLS 估计量,全文基于 Judea Pearl 的因果推断框架 (虽然我还没有怎么学过…)

考虑下图中的因果关系

首先,这个总效应在理论上是

$$\beta_{xy}+\beta_{xm}\beta_{my}$$

它的有偏估计量为

$$\hat{\beta}_{xy}=\frac{\mathrm{Cov}(X,Y)}{\mathrm{Var}(X)}$$

其中有

$$\begin{aligned}\mathrm{Var}(X)&=\beta^2_{u_1x}\mathrm{Var}(U_1)+\sigma^2_x\\\mathrm{Var}(U_1)&=\sigma^2_{u_1}\\\mathrm{Cov}(X,Y)&=\beta_{xy}\mathrm{Var}(X)+\beta_{xm}\beta_{my}\mathrm{Var}(X)+\beta_{u_1x}\mathrm{Var}(U_1)(\beta_{u_1y}+\beta_{u_1m}\beta_{my})\end{aligned}$$

所以

$$\begin{aligned}\hat{\beta}_{xy}&=\beta_{xy}+\beta_{xm}\beta_{my}+\frac{\beta_{u_1x}\mathrm{Var}(U_1)(\beta_{u_1y}+\beta_{u_1m}\beta_{my})}{\mathrm{Var}(X)}\\&=\beta_{xy}+\beta_{xm}\beta_{my}+\frac{\beta_{u_1x}\sigma^2_{u_1}(\beta_{u_1y}+\beta_{u_1m}\beta_{my})}{\beta^2_{u_1x}\sigma^2_{u_1}+\sigma^2_x}\end{aligned}\tag{1}$$

控制 $M$ 时,它的有偏估计量为

$$\hat{\beta}_{xy|m}=\frac{\mathrm{Cov}(X,Y)\mathrm{Var}(M)-\mathrm{Cov}(Y,M)\mathrm{Cov}(X,M)}{\mathrm{Var}(X)\mathrm{Var}(M)-\mathrm{Cov}(X,M)^2}\tag{2}$$

其中

$$\begin{aligned}\mathrm{Var}(M)&=\beta^2_{u_1m}\mathrm{Var}(U_1)+\beta^2_{u_2m}\mathrm{Var}(U_2)+\beta^2_{xm}\mathrm{Var}(X)+2\beta_{u_1m}\beta_{xm}\mathrm{Cov}(X,U_1)\\&\qquad+\sigma^2_m\\\mathrm{Var}(U_2)&=\sigma^2_{u_2}\\\mathrm{Cov}(X,Y)&=\beta_{xy}\mathrm{Var}(X)+\beta_{xm}\beta_{my}\mathrm{Var}(X)+\beta_{u_1x}\mathrm{Var}(U_1)(\beta_{u_1y}+\beta_{u_1m}\beta_{my})\\\mathrm{Cov}(Y,M)&=\beta_{my}\mathrm{Var}(M)+\beta_{u_1m}\mathrm{Var}(U_1)\beta_{u_1y}+\beta_{u_2m}\mathrm{Var}(U_2)\beta_{u_2y}\\&\qquad+\beta_{xm}\beta_{u_1x}\mathrm{Var}(U_1)\beta_{u_1y}+\beta_{xm}\mathrm{Var}(X)\beta_{xy}+\beta_{u_1m}\mathrm{Var}(U_1)\beta_{u_1x}\beta_{xy}\\\mathrm{Cov}(X,M)&=\beta_{xm}\mathrm{Var}(X)+\beta_{u_1x}\mathrm{Var}(U_1)\beta_{u_1m}\\\mathrm{Cov}(X,U_1)&=\beta_{u_1x}\mathrm{Var}(U_1)\end{aligned}$$

如果假设所有误差项等于 1,那么 $(1)$ 式可以被简化为

$$\hat{\beta}_{xy}=\beta_{xy}+\beta_{xm}\beta_{my}+\frac{\beta_{u_1x}(\beta_{u_1y}+\beta_{u_1m}\beta_{my})}{\beta^2_{u_1x}+1}\tag{3}$$

而 $(2)$ 式中的各项可以被简化为

$$\begin{aligned}\mathrm{Var}(X)&=\beta^2_{u_1x}+1\\\mathrm{Var}(M)&=\beta^2_{u_1m}+\beta^2_{u_2m}+\beta^2_{xm}(\beta^2_{u_1x}+1)+2\beta_{u_1m}\beta_{xm}\beta_{u_1x}+1\\\mathrm{Cov}(X,U_1)&=\beta_{u_1x}\\\mathrm{Cov}(X,Y)&=\beta_{xy}(\beta^2_{u_1x}+1)+\beta_{xm}\beta_{my}(\beta^2_{u_1x}+1)+\beta_{u_1x}(\beta_{u_1y}+\beta_{u_1m}\beta_{my})\\\mathrm{Cov}(Y,M)&=\beta_{my}\mathrm{Var}(M)+\beta_{u_1m}\beta_{u_1y}+\beta_{u_2m}\beta_{u_2y}+\beta_{xm}\beta_{u_1x}\beta_{u_1y}\\&\qquad+\beta_{xm}\beta_{xy}(\beta^2_{u_1x}+1)+\beta_{u_1m}\beta_{u_1x}\beta_{xy}\\\mathrm{Cov}(X,M)&=\beta_{xm}(\beta^2_{u_1x}+1)+\beta_{u_1x}\beta_{u1_m}\end{aligned}$$

从而

$$\begin{aligned}\hat{\beta}_{xy|m}&=\frac{\left[(\beta^2_{u_2m}+1)\beta_{xy}-\beta_{xm}\beta_{u_2m}\beta_{u_2y}\right](\beta^2_{u_1x}+1)+\beta^2_{u_1m}\beta_{xy}+(\beta^2_{u_2m}+1)\beta_{u_1x}\beta_{u_1y}}{(\beta^2_{u_1x}+1)(\beta^2_{u_2m}+1)+\beta^2_{u_1m}}\\&\qquad-\frac{(\beta_{xm}\beta_{u_1y}+\beta_{u_1x}\beta_{u_2m}\beta_{u_2y})\beta_{u_1m}}{(\beta^2_{u_1x}+1)(\beta^2_{u_2m}+1)+\beta^2_{u_1m}}\end{aligned}\tag{4}$$

最后,不控制和控制 $M$ 时的偏倚分别是 $\hat{\beta}_{xy}-\beta_{xy}-\beta_{xm}\beta_{my}$ 和 $\hat{\beta}_{xy|m}-\beta_{xy}-\beta_{xm}\beta_{my}.$

Groenwold, Rolf H. H.a,b; Palmer, Tom M.c,d; Tilling, Kated To Adjust or Not to Adjust? When a “Confounder” Is Only Measured After Exposure, Epidemiology: March 2021 - Volume 32 - Issue 2 - p 194-201
doi: 10.1097/EDE.0000000000001312