Package: gfoRmula 1.1.0

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.0.tar.gz
gfoRmula_1.1.0.zip(r-4.5)gfoRmula_1.1.0.zip(r-4.4)gfoRmula_1.1.0.zip(r-4.3)
gfoRmula_1.1.0.tgz(r-4.4-any)gfoRmula_1.1.0.tgz(r-4.3-any)
gfoRmula_1.1.0.tar.gz(r-4.5-noble)gfoRmula_1.1.0.tar.gz(r-4.4-noble)
gfoRmula_1.1.0.tgz(r-4.4-emscripten)gfoRmula_1.1.0.tgz(r-4.3-emscripten)
gfoRmula.pdf |gfoRmula.html
gfoRmula/json (API)
NEWS

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

Peer review:

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

Datasets:
  • basicdata - Example Dataset for a Survival Outcome with Censoring
  • basicdata_nocomp - Example Dataset for a Survival Outcome without Censoring
  • 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:

8.31 score 155 stars 131 scripts 730 downloads 1 mentions 11 exports 80 dependencies

Last updated 2 months agofrom:ed5ca7b0d4. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKOct 31 2024
R-4.5-winOKOct 31 2024
R-4.5-linuxOKOct 31 2024
R-4.4-winOKOct 31 2024
R-4.4-macOKOct 31 2024
R-4.3-winOKOct 31 2024
R-4.3-macOKOct 31 2024

Exports:carry_forwardcumavggformulagformula_binary_eofgformula_continuous_eofgformula_survivallagavglaggedsimple_restrictionstaticthreshold

Dependencies:abindbackportsbootbroomcarcarDataclicolorspacecorrplotcowplotcpp11crayondata.tableDerivdigestdoBydplyrfansifarverFormulagenericsggplot2ggpubrggrepelggsciggsignifgluegridExtragtablehmsisobandlabelinglatticelifecyclelme4magrittrMASSMatrixMatrixModelsmaxLikmgcvmicrobenchmarkminqamiscToolsmodelrmunsellnlmenloptrnnetnumDerivpbkrtestpillarpkgconfigpolynomprettyunitsprogresspurrrquantregR6RColorBrewerRcppRcppEigenrlangrstatixsandwichscalesSparseMstringistringrsurvivaltibbletidyrtidyselecttruncnormtruncregutf8vctrsviridisLitewithrzoo

A Simplified Approach for Specifying Interventions in gfoRmula

Rendered fromIntervention-Specification.Rmdusingknitr::rmarkdownon Oct 31 2024.

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

Using Custom Outcome Models in gfoRmula

Rendered fromCustom-Outcome-Models.Rmdusingknitr::rmarkdownon Oct 31 2024.

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

Readme and manuals

Help Manual

Help pageTopics
Example Dataset for a Survival Outcome with Censoringbasicdata
Example Dataset for a Survival Outcome without Censoringbasicdata_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