gfoRmula: Parametric G-Formula

Implements the non-iterative conditional expectation (NICE) algorithm of the g-formula algorithm (Robins (1986) <doi:10.1016/0270-0255(86)90088-6>, Hernán and Robins (2024, ISBN:9781420076165)). The g-formula can estimate an outcome's counterfactual mean or risk under hypothetical treatment strategies (interventions) when there is sufficient information on time-varying treatments and confounders. This package can be used for discrete or continuous time-varying treatments and for failure time outcomes or continuous/binary end of follow-up outcomes. The package can handle a random measurement/visit process and a priori knowledge of the data structure, as well as censoring (e.g., by loss to follow-up) and two options for handling competing events for failure time outcomes. Interventions can be flexibly specified, both as interventions on a single treatment or as joint interventions on multiple treatments. See McGrath et al. (2020) <doi:10.1016/j.patter.2020.100008> for a guide on how to use the package.

Version: 1.1.0
Depends: R (≥ 3.5.0)
Imports: data.table, ggplot2, ggpubr, grDevices, nnet, parallel, progress, stats, stringr, survival, truncnorm, truncreg, utils
Suggests: Hmisc, knitr, randomForest, rmarkdown, testthat (≥ 3.0.0)
Published: 2024-10-01
DOI: 10.32614/CRAN.package.gfoRmula
Author: Victoria Lin [aut] (V. Lin and S. McGrath made equal contributions), Sean McGrath ORCID iD [aut, cre] (V. Lin and S. McGrath made equal contributions), Zilu Zhang [aut], Roger W. Logan [aut], Lucia C. Petito [aut], Jing Li [aut], McGee Emma ORCID iD [aut], Cheng Carrie [aut], Jessica G. Young ORCID iD [aut] (M.A. Hernán and J.G. Young made equal contributions), Miguel A. Hernán [aut] (M.A. Hernán and J.G. Young made equal contributions), 2019 The President and Fellows of Harvard College [cph]
Maintainer: Sean McGrath <sean_mcgrath at g.harvard.edu>
BugReports: https://github.com/CausalInference/gfoRmula/issues
License: GPL-3
URL: https://github.com/CausalInference/gfoRmula, https://doi.org/10.1016/j.patter.2020.100008
NeedsCompilation: no
Materials: README NEWS
In views: CausalInference
CRAN checks: gfoRmula results

Documentation:

Reference manual: gfoRmula.pdf
Vignettes: Using Custom Outcome Models in gfoRmula (source, R code)
A Simplified Approach for Specifying Interventions in gfoRmula (source, R code)

Downloads:

Package source: gfoRmula_1.1.0.tar.gz
Windows binaries: r-devel: gfoRmula_1.1.0.zip, r-release: gfoRmula_1.1.0.zip, r-oldrel: gfoRmula_1.1.0.zip
macOS binaries: r-release (arm64): gfoRmula_1.1.0.tgz, r-oldrel (arm64): gfoRmula_1.1.0.tgz, r-release (x86_64): gfoRmula_1.1.0.tgz, r-oldrel (x86_64): gfoRmula_1.1.0.tgz
Old sources: gfoRmula archive

Linking:

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