SkillAgentSearch skills...

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/GfoRmula
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<!-- README.md is generated from README.Rmd. Please edit that file -->

gfoRmula: Parametric G-Formula

<!-- badges: start -->

CRAN_Status_Badge R-CMD-check Codecov test
coverage

<!-- 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”
View on GitHub
GitHub Stars183
CategoryProduct
Updated1mo ago
Forks72

Languages

R

Security Score

80/100

Audited on Feb 9, 2026

No findings