https://cran.r-project.org/web/packages/gFormulaMI/index.html
CRAN: Package gFormulaMI
Implements the G-Formula method for causal inference with time-varying treatments and confounders using Bayesian multiple imputation methods, as described by...
cranpackage