GfoRmula
The gfoRmula package implements the parametric g-formula in R. The parametric g-formula (Robins, 1986) uses longitudinal data with time-varying treatments and confounders to estimate the risk or mean of an outcome under hypothetical treatment strategies specified by the user.
Install / Use
/learn @CausalInference/GfoRmulaREADME
<!-- README.md is generated from README.Rmd. Please edit that file -->
gfoRmula: Parametric G-Formula
<!-- badges: start --> <!-- badges: end -->Installation
You can install the released version of gfoRmula from CRAN with:
install.packages("gfoRmula")
After installing the devtools package (i.e., calling
install.packages(devtools)), the development version of gfoRmula can
be installed from GitHub with:
devtools::install_github("CausalInference/gfoRmula")
Usage
Please refer to McGrath et
al. (2020) for a detailed
guide to the gfoRmula package. Also, see the following vignettes
regarding updates since McGrath et al. (2020):
- “A Simplified Approach for Specifying Interventions in gfoRmula”
- “Using Custom Outcome Models in gfoRmula”
