FARMA (Factor-Adjusted Regression for Mediation Analysis) studies causal mediation when the mediator, pre-treatment covariates, or both are latent and measured through high-dimensional surrogates. The method combines factor projections with cross-fitted mediation regressions.
Paper: Himani Yadav, Shi Bo, AmirEmad Ghassami, and Debarghya Mukherjee. Causal Mediation Analysis with High-Dimensional Surrogates: Identification, Estimation and Inference under Latent Factor Models, 2026.
This repository contains the two-fold cross-fitting simulation implementation and its experiment driver:
-
simulation/farma_core.Rgenerates synthetic observations and computes the cross-fitted estimate of the intermediate mean parameter$\theta_0$ . -
simulation/run_design.Rruns the baseline, heavy-tailed, signal-strength, and working-dimension simulation designs. -
tests/smoke.Rchecks a small synthetic run.
The supplied core is simulation code. It does not provide a general interface for observational data or a complete single-dataset estimator of the natural indirect effect, standard error, or confidence interval. Its simulation summaries use Monte Carlo variability across repetitions. The full set of paper results has not been re-run for this release.
The code splits observations in their generated order and computes projections from uncentered matrices; the paper describes random sample splitting and covariance-based projections. These implementation details should be considered when comparing the code and paper.
With R installed, install the required packages and run the small test from the repository root:
install.packages(c("MASS", "pracma", "foreach", "doParallel", "doRNG"))Rscript tests/smoke.RThe smoke test has been run using R 4.3.2. For a full simulation, the driver accepts a design, output CSV, log file, number of workers, and number of repetitions. For example:
Rscript simulation/run_design.R base results.csv run.log 4 500Each design evaluates a grid of settings. Even with fewer repetitions, these grids can be computationally intensive.
@article{yadav2026farma,
title = {Causal Mediation Analysis with High-Dimensional Surrogates: Identification, Estimation and Inference under Latent Factor Models},
author = {Yadav, Himani and Bo, Shi and Ghassami, AmirEmad and Mukherjee, Debarghya},
journal = {arXiv preprint arXiv:2611.03167},
year = {2026}
}See LICENSE.