gfoRmula
1.1.1Parametric G-Formula
Overview
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.
Install
Health
- ERROR r-release-macos-x86_64
- ERROR2026-05-0212 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
- OK2026-03-1014 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
Documentation
- Examples that run
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- References docs
- 9%
Downloads
Repository
Stars over time
Forks over time
Issues over time
PRs over time
Repository practices
3 development-tooling and community-health practices detected across 3 families in the upstream repository
Checks run against github.com/causalinference/gformula on 2026-07-26.
Dependencies
Nothing depends on this yet.
Code & Tests
People & History
11 releases. Pick two to compare their code metrics. R releases are shown for context.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- 1.1.1Latest
- 1.1.02024-10-01 · diff ↗
- RR 4.4.0 released · 2024-04-24
- 1.0.42024-01-30 · diff ↗
- 1.0.32023-05-18 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 1.0.22023-02-27 · diff ↗
- 1.0.12023-01-12 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 1.0.02022-04-09 · diff ↗
- 0.3.22021-07-13 · diff ↗
- RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- 0.3.12020-03-23 · diff ↗
Show 3 earlier events
- 0.3.02020-01-30 · diff ↗
- 0.2.12019-08-25
- RR 3.6.0 released · 2019-04-26
Package metadata
- First published
- 2019-08-25
- Total releases
- 11 / 7 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 3.5.0
- Bundled data
- 1.8 MB / 6 files
- Download size
- 1.9 MB
- Installed size
- not tracked yet
- With dependencies
- not tracked yet