Appendix
eAppendix 1:Properties of U given X and M if U and M are normally distributed
We assume the following model for the mediator:
M =α0+α1X+α2C+α3U +M,
where the error termM is normally distributed with constant variance> 0. We assume that U follows a standard normal distribution, and that U and M are independent. We further assumed thatU is independent ofCandX. Therefore the distribution of(U|X, C) is equal to the distribution ofU. The distribution of(M|X, C)and(U|X, C)is bivariate normal (because U and M are independent and both normally distributed). Standard theory regarding bivariate normal distributions gives that the conditional distribution ofU givenX,CandM is in this case also normal with mean:
E[U|M, X, C] = μU|X,C + σU|X,C
σM|X,Ccor[M, U|X, C](M−E[M|X, C])
= cor(M, U|X, C)(M −E[M|X, C])
σM|X,C ,
becauseμU|X,C =μU = 0andσU|X,C =σU = 1. The variance ofU|X, M, C is var[U|X, M, C] = (1−cor[M, U|X, C]2).
Since the mediator depends linearly on X,C andU , the correlation ofU andM given X, C is cor[M, U|X, C] =E[MU|X, C]/(σM|X,CσU|X,C) =α3/σM|X,C. This yields:
E[U|M, X, C] = α3
σM|X,C2 (M −(α0+α1X+α2C)) var[U|M, X, C] = (1−α23/σM|X,C2 )
Since(U|M, X, C)is normal, it also follows directly using standard theory regarding 1
normal distributions that:
E[exp(β5U)|X, M, C]) = exp(β5E[U|X, M, C] +1
2β52var[U|X, M, C])
= exp(β5 α3
σM2 |X,C(M −(α0+α1X+α2C)) + 1
2β52(1−α23/σ2M|X,C))
eAppendix 2: Standard errors and confidence intervals for the cor- rected direct and indirected effects estimates
Let S be the covariance matrix of the estimates of the fitted mediation modelα0· · · , α2, with elementssij, and T be the covariance matrix of the estimates of the fitted outcome modelβ0· · · , β4, with elementstij.
For the linear outcome model, the corrected CDE is estimated as CDE(m) = ˆβ1∗+ ˆβ3∗m+ ˆα1α3β5/σM2 |X,C
The variance of this estimate is:
var(CDE(m)) =t11+t33m2+ 2t13m+s11[α3β5/σM2 |X,C]2.
The corrected NDE is
NDE = ˆβ1∗+ ˆβ3∗(ˆα0+ ˆα1x0+ ˆα2c) + ˆα1α3β5/σM2 |X,C
The variance of this estimate can easily be estimated using the delta method, yielding:
var(NDE) =
⎛
⎜⎜
⎜⎜
⎜⎝
βˆ3∗
βˆ3∗x0+α3β5/σM|X,C2 βˆ3∗c
ˆ 1
α0+ ˆα1x0+ ˆα2c
⎞
⎟⎟
⎟⎟
⎟⎠
⎛
⎜⎜
⎜⎜
⎝
s00 s10 s20 0 0 s10 s11 s21 0 0 s20 s21 s22 0 0 0 0 0 t11 t31 0 0 0 t31 t33
⎞
⎟⎟
⎟⎟
⎠
⎛
⎜⎜
⎜⎜
⎜⎝
βˆ3∗
βˆ3∗x0+α3β5/σ2M|X,C βˆ3∗c
ˆ 1
α0+ ˆα1x0+ ˆα2c
⎞
⎟⎟
⎟⎟
⎟⎠
The corrected NIE is
NIE = ˆβ2∗αˆ1+ ˆβ3∗αˆ1(x0+ 1)−αˆ1α3β5/σM2 |X,C 2
and estimate of the variance is
var(NIE) =
⎛
⎝ βˆ2∗+ ˆβ3∗(x0+ 1)−α3β5/σM|X,C2 ˆ
α1 ˆ
α1(x0+ 1)
⎞
⎠
⎛
⎝ s11 0 0 0 t22 t32 0 t32 t33
⎞
⎠
⎛
⎝ βˆ2∗+ ˆβ3∗(x0+ 1)−α3β5/σM2 |X,C ˆ
α1 ˆ
α1(x0 + 1)
⎞
⎠
For the relative risk model and the odds ratio model, the variance of the logarithm of the direct and indirect effects should be calculated. This yields the same variance estimates for the logarithm of controlled direct effect and the natural indirect effect as described above.
The logarithm of the corrected direct effect is
log(NDE) = ˆβ1∗+ ˆβ3∗(ˆα0+ˆα1x0+ˆα2c+ ˆβ2∗σM2 |X,C)+0.5 ˆβ32σM2 |X,C((x0+1)2−x20)+ˆα1α3β5/σM|X,C2
The variance of this estimate can be estimated by:
var(log(NDE)) =
⎛
⎜⎜
⎜⎜
⎜⎜
⎜⎝
βˆ3∗
βˆ3∗x0+α3β5/σ2M|X,C βˆ3∗c
ˆ 1
β3∗σM2 |X,C ˆ
α0+ ˆα1x0+ ˆα2cβˆ2∗σ2M|X,C + ˆβ3σM2 |X,C((x0+ 1)2−x20)
⎞
⎟⎟
⎟⎟
⎟⎟
⎟⎠
⎛
⎜⎜
⎜⎜
⎜⎜
⎝
s00 s10 s20 0 0 0 s10 s11 s21 0 0 0 s20 s21 s22 0 0 0 0 0 0 t11 t21 t31 0 0 0 t21 t22 t32 0 0 0 t31 t32 t33
⎞
⎟⎟
⎟⎟
⎟⎟
⎠
×
⎛
⎜⎜
⎜⎜
⎜⎜
⎜⎝
βˆ3∗
βˆ3∗x0 +α3β5/σM2 |X,C βˆ3∗c
ˆ 1
β3∗σ2M|X,C ˆ
α0+ ˆα1x0+ ˆα2cβˆ2∗σM2 |X,C + ˆβ3σM|X,C2 ((x0 + 1)2−x20)
⎞
⎟⎟
⎟⎟
⎟⎟
⎟⎠
3
eAppendix 3: Derivation of the reduced model if U is binary and the response model for Y is linear
Let U be binary with prevalencepu = Pr(U = 1). Then the reduced linear regression model is:
E[Y|X, M, C] = β0+β1X+β2M +β3MX +β4C+β5E[U|X, M]
= β0+β1X+β2M +β3MX +β4C+β5Pr[U = 1|X, M]
Using Bayes’ rule yields:
Pr[U = 1|X, M, C] = puf(M|X, C,1)
puf(M|X, C,1) + (1−pu)f(M|X, C,0)
= puf(M|X, C,1)/f(M|X, C,0) puf(M|X, C,1)/f(M|X, C,0) + (1−pu)
withf(.)the density function ofM|X, C, U. Since(M|X, C, U)is normally distributed, with meanα0+α1X+α2C+α3U, and variance equal toσM|X,C,U2 , the following holds:
f(M|U = 1, X, C)/f(M|U = 0, X, C) = exp((α3(M−α0−α1X−α2C)−0.5α32)/σM2 |X,C,U)
If we define
g(m, α) = exp((α3(m−α)−0.5α23))/σM2 |X,C,U), the reduced model can be written as
E[Y|X, M, C] =β0+β1X+β2M+β3MX+β4C+β5 pug(m, α0+α1X+α2C) g(m, α0+α1X+α2C) + (1−pu) which shows that the resulting model is no longer linear inX, C, M andMX.
4