Package: gfoRmula 1.1.2

Sean McGrath

gfoRmula: Parametric G-Formula

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.

Authors:Victoria Lin [aut], Sean McGrath [aut, cre], Zilu Zhang [aut], Roger W. Logan [aut], Lucia C. Petito [aut], Jing Li [aut], McGee Emma [aut], Cheng Carrie [aut], Jessica G. Young [aut], Miguel A. Hernán [aut], 2019 The President and Fellows of Harvard College [cph]

gfoRmula_1.1.2.tar.gz
gfoRmula_1.1.2.zip(r-4.7)gfoRmula_1.1.2.zip(r-4.6)gfoRmula_1.1.2.zip(r-4.5)
gfoRmula_1.1.2.tgz(r-4.6-any)gfoRmula_1.1.2.tgz(r-4.5-any)
gfoRmula_1.1.2.tar.gz(r-4.7-any)gfoRmula_1.1.2.tar.gz(r-4.6-any)
gfoRmula_1.1.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
gfoRmula/json (API)

# Install 'gfoRmula' in R:
install.packages('gfoRmula', repos = c('https://causalinference.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/causalinference/gformula/issues

Datasets:
  • basicdata - Example Dataset for a Survival Outcome with Competing Events
  • basicdata_nocomp - Example Dataset for a Survival Outcome without Competing Events
  • binary_eofdata - Example Dataset for a Binary Outcome at End of Follow-Up
  • censor_data - Example Dataset for a Survival Outcome with an Indicator of Censoring Variable
  • continuous_eofdata - Example Dataset for a Continuous Outcome at End of Follow-Up
  • continuous_eofdata_pb - Example Dataset for a Continuous Outcome at End of Follow-Up with Pre-Baseline Times

On CRAN:

Conda:

7.55 score 184 stars 191 scripts 434 downloads 1 mentions 11 exports 88 dependencies

Last updated from:86653ca131. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK210
source / vignettesOK214
linux-release-x86_64OK228
macos-release-arm64OK120
macos-oldrel-arm64OK125
windows-develOK166
windows-releaseOK151
windows-oldrelOK159
wasm-releaseOK129

Exports:carry_forwardcumavggformulagformula_binary_eofgformula_continuous_eofgformula_survivallagavglaggedsimple_restrictionstaticthreshold

Dependencies:abindbackportsbootbroomcarcarDataclicolorspacecorrplotcowplotcpp11crayondata.tableDerivdigestdoBydplyrfarverforecastFormulafracdiffgenericsggplot2ggpubrggrepelggsciggsignifgluegridExtragtablehmsisobandlabelinglatticelifecyclelme4lmtestmagrittrMASSMatrixMatrixModelsmaxLikmgcvmicrobenchmarkminqamiscToolsmodelrnlmenloptrnnetnumDerivpbkrtestpillarpkgconfigpolynomprettyunitsprogresspurrrquantregR6rbibutilsRColorBrewerRcppRcppArmadilloRcppEigenRdpackreformulasrlangrstatixS7sandwichscalesSparseMstringistringrsurvivaltibbletidyrtidyselecttimeDatetruncnormtruncregurcautf8vctrsviridisLitewithrzoo

Using Custom Outcome Models in gfoRmula
Specifying custom outcome models | Example | References

Last update: 2024-09-13
Started: 2024-09-13

A Simplified Approach for Specifying Interventions in gfoRmula
Specifying Interventions | Example 1: Static interventions | Example 2: Custom interventions | References

Last update: 2024-07-20
Started: 2024-07-20

Readme and manuals

Help Manual

Help pageTopics
Example Dataset for a Survival Outcome with Competing Eventsbasicdata
Example Dataset for a Survival Outcome without Competing Eventsbasicdata_nocomp
Example Dataset for a Binary Outcome at End of Follow-Upbinary_eofdata
Carry Forwardcarry_forward
Example Dataset for a Survival Outcome with an Indicator of Censoring Variablecensor_data
Coefficient method for objects of class "gformula"coef.gformula
Example Dataset for a Continuous Outcome at End of Follow-Upcontinuous_eofdata
Example Dataset for a Continuous Outcome at End of Follow-Up with Pre-Baseline Timescontinuous_eofdata_pb
Estimation of Survival Outcome, Continuous End-of-Follow-Up Outcome, or Binary End-of-Follow-Up Outcome Under the Parametric G-Formulagformula
Estimation of Binary End-of-Follow-Up Outcome Under the Parametric G-Formulagformula_binary_eof
Estimation of Continuous End-of-Follow-Up Outcome Under the Parametric G-Formulagformula_continuous_eof
Estimation of Survival Outcome Under the Parametric G-Formulagformula_survival
History functionscumavg lagavg lagged
Plot method for objects of class "gformula_binary_eof"plot.gformula_binary_eof
Plot method for objects of class "gformula_continuous_eof"plot.gformula_continuous_eof
Plot method for objects of class "gformula_survival"plot.gformula_survival
Print and summary methods for "gformula" objectsprint.gformula_binary_eof print.gformula_continuous_eof print.gformula_survival print.summary.gformula summary.gformula
Simple Restrictionsimple_restriction
Static Interventionstatic
Threshold Interventionthreshold
Variance-covariance method for objects of class "gformula"vcov.gformula