gfoRmula1.0.4 package

Parametric G-Formula

get_plot_info

Get Plotting Information

gformula

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

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

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

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

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

pred_fun_Y

Fit Outcome Model

predict_binomial

Simulate Binary Values

predict_normal

Simulate Normal Values

predict_trunc_normal

Simulate Truncated Normal Values

Implements the parametric g-formula algorithm of Robins (1986) <doi:10.1016/0270-0255(86)90088-6>. The g-formula can be used to estimate the causal effects of hypothetical time-varying treatment interventions on the mean or risk of an outcome from longitudinal data with time-varying confounding. This package allows: 1) binary or continuous/multi-level time-varying treatments; 2) different types of outcomes (survival or continuous/binary end of follow-up); 3) data with competing events or truncation by death and loss to follow-up and other types of censoring events; 4) different options for handling competing events in the case of survival outcomes; 5) a random measurement/visit process; 6) joint interventions on multiple treatments; and 7) general incorporation of a priori knowledge of the data structure.

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