Causal Mediation Analysis of Perturbation Screens
devtools::install_github('jduan607/CMAPS')
CMAPS expects a matrix or data frame where each row corresponds to a single cell. Required columns include the treatment variable (
Assumption 4(c) requires that the conditional variance of the mediator differs across treatment levels, that is, $$var(M\mid A=a, C) \neq var(M\mid A=a^, C),\ \forall a, a^, C.$$ This condition ensures identifiability of mediation effects in the presence of unmeasured mediator–outcome confounding.
To empirically assess this assumption, we apply heteroscedasticity tests implemented in the olsrr package, which provides score, F, and Breusch–Pagan (BP) tests. The null hypothesis corresponds to homoscedasticity, with heteroscedastic errors under the alternative.
A p-value below a nominal significance level (e.g., 0.05) leads to rejection of the null and provides support for Assumption 4(c). In our analysis, we use the score test. The following example uses STAT5A as the mediator, for which the score test yields a p-value below 0.05, supporting Assumption 4(c).
In the semiparametric estimation step,
-
$\theta_A$ : the effect of treatment on the outcome ($A\to Y$ ) -
$\theta_M$ : the effect of mediator on the outcome ($M\to Y$ ) -
$\beta_A$ : the effect of treatment on the mediator ($A\to M$ ) - NIE: The natural indirect effect (NIE) is defined as
$\theta_M\times \beta_A$ The standard error of the NIE is obtained using the delta method.
When fast = TRUE, the estimator is obtained using a one-step estimator.
When fast = FALSE, the estimating equations are solved directly using the nleqslv package.
Based on the semiparametric estimates and their asymptotic covariance matrix, the adaptive bootstrap procedure is used to obtain a p-value for the NIE.