Sensitivity analysis for the average causal mediation effect (ACME) under the linear structural equation model. Fits the Baron-Kenny system, equations (11)-(13) of Imai, Keele & Yamamoto (2010):
Arguments
- y
Numeric outcome vector.
- treatment
Numeric treatment vector, same length as
y.- mediator
Numeric mediator vector, same length as
y.- r2_grid
Numeric vector of values of the product \(R^{2*}_M R^{2*}_Y\), each in [0, 1). Defaults to 10 points on [0, 0.81]. The ACME is reported at both signs of \(\rho\), because its sign follows \(sign(\lambda_2\lambda_3)\), which the data cannot reveal.
Value
Named list with estimate (the ACME under sequential
ignorability), rho_breakdown, r2_grid,
rho_grid, acme_positive, acme_negative,
beta2, gamma, sigma1, sigma2, n,
method.
Details
$$Y_i = \alpha_1 + \beta_1 T_i + \epsilon_{i1}$$ $$M_i = \alpha_2 + \beta_2 T_i + \epsilon_{i2}$$ $$Y_i = \alpha_3 + \beta_3 T_i + \gamma M_i + \epsilon_{i3}$$
Under sequential ignorability the ACME is \(\beta_2\gamma\) (their Theorem 2). That assumption fails if an unobserved pre-treatment variable confounds the mediator-outcome relation. Their Theorem 4 identifies the ACME for any given \(\rho = Corr(\epsilon_{i2}, \epsilon_{i3})\):
$$\bar\delta(\rho) = \frac{\beta_2\sigma_1}{\sigma_2} \left[\tilde\rho - \rho\sqrt{(1-\tilde\rho^2)/(1-\rho^2)}\right]$$
with \(\sigma_j^2 = Var(\epsilon_{ij})\) and \(\tilde\rho = Corr(\epsilon_{i1}, \epsilon_{i2})\). The ACME is zero exactly at \(\rho = \tilde\rho\), which makes \(\tilde\rho\) the breakdown point of the finding.
Writing the confounder explicitly as
\(\epsilon_{ij} = \lambda_j U_i + \epsilon'_{ij}\) gives the
partial-\(R^2\) reading of the same parameter, the share of
otherwise unexplained variance that U accounts for. Imai et al.
attribute that parameterisation to Imbens (2003). It satisfies
\(\rho^2 = R^{2*}_M R^{2*}_Y\), which is how r2_grid is
interpreted here.
Mirrors morie.fn.sensMI on the Python side.
