gfoRmula1.1.0 package

Parametric G-Formula

bootstrap_helper

Bootstrap Observed Data and Simulate Under All Interventions

carry_forward

Carry Forward

coef.gformula

Coefficient method for objects of class "gformula"

error_catch

General Error Catching

fit_bounded_continuous

Fit Bounded Normal Model on Covariate

fit_glm

Fit GLM on Covariate

fit_multinomial

Fit Multinomial Model on Covariate

fit_trunc_normal

Fit Truncated Normal Model on Covariate

fit_zeroinfl_normal

Fit Zero-Inflated Normal Model on Covariate

get_cvgrphs

Get Covariate Plots

get_outgrphs

Get Risk and Survival Plots

get_plot_info

Get Plotting Information

gformula_binary_eof

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

gformula_continuous_eof

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

gformula_survival

Estimation of Survival Outcome Under the Parametric G-Formula

gformula

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

hr_helper

Format Simulated Dataset for Hazard Ratio Calculation

intfunc

Execute Intervention

lagged

History functions

make_histories

Generates Functions of History of Existing Covariates

natural

Natural Course Intervention

obs_calculate

Calculate Observed Covariate Means and Risk

plot.gformula_binary_eof

Plot method for objects of class "gformula_binary_eof"

plot.gformula_continuous_eof

Plot method for objects of class "gformula_continuous_eof"

plot.gformula_survival

Plot method for objects of class "gformula_survival"

pred_fun_cov

Fit Covariate Models

pred_fun_D

Fit Competing Event Model

pred_fun_Y

Fit Outcome Model

predict_binomial

Simulate Binary Values

predict_normal

Simulate Normal Values

predict_trunc_normal

Simulate Truncated Normal Values

print.gformula_survival

Print and summary methods for "gformula" objects

rmse_calculate

Calculate RMSE for Covariate, Outcome, and Competing Risk Models

simple_restriction

Simple Restriction

simulate

Simulate Counterfactual Outcomes Under Intervention

static

Static Intervention

threshold

Threshold Intervention

vcov.gformula

Variance-covariance method for objects of class "gformula"

visit_sum

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