gfoRmula1.1.0 package

Parametric G-Formula

Bootstrap Observed Data and Simulate Under All Interventions

Carry Forward

Coefficient method for objects of class "gformula"

General Error Catching

Fit Bounded Normal Model on Covariate

Fit GLM on Covariate

Fit Multinomial Model on Covariate

Fit Truncated Normal Model on Covariate

Fit Zero-Inflated Normal Model on Covariate

Get Covariate Plots

Get Risk and Survival Plots

Get Plotting Information

Estimation of Binary End-of-Follow-Up Outcome Under the Parametric G-F...

Estimation of Continuous End-of-Follow-Up Outcome Under the Parametric...

Estimation of Survival Outcome Under the Parametric G-Formula

Estimation of Survival Outcome, Continuous End-of-Follow-Up Outcome, o...

Format Simulated Dataset for Hazard Ratio Calculation

Execute Intervention

History functions

Generates Functions of History of Existing Covariates

Natural Course Intervention

Calculate Observed Covariate Means and Risk

Plot method for objects of class "gformula_binary_eof"

Plot method for objects of class "gformula_continuous_eof"

Plot method for objects of class "gformula_survival"

Fit Covariate Models

Fit Competing Event Model

Fit Outcome Model

Simulate Binary Values

Simulate Normal Values

Simulate Truncated Normal Values

Print and summary methods for "gformula" objects

Calculate RMSE for Covariate, Outcome, and Competing Risk Models

Simple Restriction

Simulate Counterfactual Outcomes Under Intervention

Static Intervention

Threshold Intervention

Variance-covariance method for objects of class "gformula"

Create Visit Sum Covariate

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.

Maintainer: Sean McGrath License: GPL-3 Last published: 2024-10-01

Useful links