The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

causalMed: Parametric G-Formula for Longitudinal Mediation and Total Effects

Causal mediation analysis for longitudinal data with time-varying exposures, mediators and confounders, covering both interventional (Lin et al. (2017) <doi:10.1002/sim.7426>) and natural (Zheng and van der Laan (2017) <doi:10.1515/jci-2016-0006>) direct and indirect effects. Estimation uses the parametric g-formula (Robins (1986) <doi:10.1016/0270-0255(86)90088-6>), which is also exposed directly so that counterfactual means or risks can be estimated under static, dynamic or time-varying hypothetical interventions.

Version: 0.1.3
Depends: R (≥ 3.5.1)
Imports: data.table, nnet, future, future.apply, progressr
Suggests: gfoRmula, Hmisc, knitr, rmarkdown, survival, testthat
Published: 2026-11-06
DOI: 10.32614/CRAN.package.causalMed
Author: Alimu Dayimu ORCID iD [aut, cre], Xingling Guo [aut]
Maintainer: Alimu Dayimu <ad938 at cam.ac.uk>
BugReports: https://github.com/adayim/causalMed/issues
License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
URL: https://github.com/adayim/causalMed, https://adayim.github.io/causalMed/
NeedsCompilation: no
Materials: README, NEWS
CRAN checks: causalMed results [issues need fixing before 2026-11-28]

Documentation:

Reference manual: causalMed.html , causalMed.pdf
Vignettes: Getting Started with causalMed (source, R code)
Causal Mediation Analysis with causalMed (source, R code)
Estimating Total Effects with the Parametric G-formula (source)
causalMed and gfoRmula: A Comparative Overview (source, R code)

Downloads:

Package source: causalMed_0.1.3.tar.gz
Windows binaries: r-devel: causalMed_0.1.3.zip, r-release: not available, r-oldrel: causalMed_0.1.3.zip
macOS binaries: r-release (arm64): causalMed_0.1.3.tgz, r-oldrel (arm64): causalMed_0.1.3.tgz, r-release (x86_64): causalMed_0.1.3.tgz, r-oldrel (x86_64): causalMed_0.1.3.tgz

Linking:

Please use the canonical form https://CRAN.R-project.org/package=causalMed to link to this page.

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.