Skip to content
shibo769Public

About

FARMA: factor-adjusted causal mediation with high-dimensional surrogates

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

FARMA: Causal Mediation with High-Dimensional Surrogates

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.

Simulation code

This repository contains the two-fold cross-fitting simulation implementation and its experiment driver:

  • simulation/farma_core.R generates synthetic observations and computes the cross-fitted estimate of the intermediate mean parameter $\theta_0$.
  • simulation/run_design.R runs the baseline, heavy-tailed, signal-strength, and working-dimension simulation designs.
  • tests/smoke.R checks 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.

Getting started

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.R

The 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 500

Each design evaluates a grid of settings. Even with fewer repetitions, these grids can be computationally intensive.

Citation

@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}
}

License

See LICENSE.

About

FARMA: factor-adjusted causal mediation with high-dimensional surrogates

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages