Package: qgcomp 2.19.0

Alexander Keil

qgcomp: Quantile G-Computation

G-computation for a set of time-fixed exposures with quantile-based basis functions, possibly under linearity and homogeneity assumptions. This approach estimates a regression line corresponding to the expected change in the outcome (on the link basis) given a simultaneous increase in the quantile-based category for all exposures. Works with continuous, binary, and right-censored time-to-event outcomes. Reference: Alexander P. Keil, Jessie P. Buckley, Katie M. OBrien, Kelly K. Ferguson, Shanshan Zhao, and Alexandra J. White (2019) A quantile-based g-computation approach to addressing the effects of exposure mixtures; <doi:10.1289/EHP5838>.

Authors:Alexander Keil [aut, cre]

qgcomp_2.19.0.tar.gz
qgcomp_2.19.0.zip(r-4.7)qgcomp_2.19.0.zip(r-4.6)qgcomp_2.19.0.zip(r-4.5)
qgcomp_2.19.0.tgz(r-4.6-any)qgcomp_2.19.0.tgz(r-4.5-any)
qgcomp_2.19.0.tar.gz(r-4.7-any)qgcomp_2.19.0.tar.gz(r-4.6-any)
qgcomp_2.19.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION
card.svg |card.png
qgcomp/json (API)

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

Bug tracker:https://github.com/alexpkeil1/qgcomp/issues

Datasets:

On CRAN:

Conda:

exposureexposure-mixtureexposure-mixturesquantile-gcomputationsurvival

9.09 score 44 stars 2 packages 116 scripts 1.3k downloads 3 mentions 40 exports 83 dependencies

Last updated from:635a97c7e9. Checks:7 WARNING, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64WARNING286
source / vignettesOK348
linux-release-x86_64WARNING287
macos-release-arm64WARNING146
macos-oldrel-arm64WARNING158
windows-develWARNING262
windows-releaseWARNING227
windows-oldrelWARNING218
wasm-releaseOK197

Exports:.qgcomp_object.qgcomp_object_addcoxmsm_fithomogeneity_testhurdlemsm_fit.controljoint_testmice.impute.leftcenslognormmice.impute.tobitmodelbound.bootmodelbound.eemsm_fitmsm_multinomial_fitmsm.predictpointwisebound.bootpointwisebound.nobootqgcompqgcomp.bootqgcomp.cch.nobootqgcomp.cox.bootqgcomp.cox.nobootqgcomp.eeqgcomp.glm.bootqgcomp.glm.eeqgcomp.glm.nobootqgcomp.hurdle.bootqgcomp.hurdle.nobootqgcomp.multinomial.bootqgcomp.multinomial.nobootqgcomp.nobootqgcomp.partialsqgcomp.survcurve.bootqgcomp.tobit.nobootqgcomp.zi.bootqgcomp.zi.nobootquantizese_combsimdata_quantizedsplit_datavc_combzimsm_fit.control

Dependencies:abindAERarmbackportsbootbroomcarcarDataclicodacodetoolscolorspacecowplotcpp11DerivdigestdoBydplyrfarverforecastFormulafracdifffuturefuture.applygenericsggplot2globalsgluegridExtragtableisobandlabelinglatticelifecyclelistenvlme4lmtestmagrittrMASSMatrixMatrixModelsmgcvmicrobenchmarkminqamodelrnlmenloptrnnetnumDerivparallellypbkrtestpillarpkgconfigpsclpurrrquantregR6rbibutilsRColorBrewerRcppRcppArmadilloRcppEigenRdpackreformulasrlangrootSolveS7sandwichscalesSparseMstringistringrsurvivaltibbletidyrtidyselecttimeDateurcautf8vctrsviridisLitewithrzoo

The qgcomp package: g-computation on exposure quantiles
Introduction

Last update: 2025-03-27
Started: 2018-10-25

Advanced topics for the qgcomp package: time-to-event, clustering, partial effects, weighting, missing data
Table of Contents | Example 7: time-to-event analysis and parallel processing | Example 8: clustering | Example 9: partial effects | Example 10: multinomial outcomes | Example 11: sample weighting from, e.g. NHANES | Missing data, limits of detection and multiple imputation | Limits of detection | Multiple imputation | References | Acknowledgments

Last update: 2025-03-27
Started: 2024-06-29

Basic topics for the qgcomp package: g-computation on exposure quantiles
Table of Contents | Introduction | The model | How to use the qgcomp package | Example 1: linear model | Example 2: conditional odds ratio, marginal odds ratio in a logistic model | Example 3: adjusting for covariates, plotting estimates | Example 4: non-linearity (and non-homogeneity) | Aside: some details on qgcomp methods for non-linearity | Interpretation of model parameters | Example 5: comparing model fits and further exploring non-linearity | Graphical approach to explore non-linearity in a correlated subset of exposures using splines | Caution about graphical approaches | Example 6: miscellaneous other ways to allow non-linearity | using indicator terms for each quantile | interactions between indicator terms | breaks at specific quantiles (these breaks act on the quantized basis) | Statistical approach explore non-linearity in a correlated subset of exposures using splines | FAQ | Why don't I get weights/scaled effects from the boot or ee functions? (and other questions about the weights/scaled effect sizes) | Do I need to model non-linearity and non-additivity of exposures? | Do I have to use quantiles? | Can I cite this document? | Where else can I get help? | References | Acknowledgments

Last update: 2025-03-27
Started: 2024-06-29

Readme and manuals

Help Manual

Help pageTopics
Creating a 'qgcompfit' object.qgcomp_object
Adding objects to a 'qgcompfit' object.qgcomp_object_add
Check for valid model terms in a qgcomp fitchecknames
Marginal structural Cox model (MSM) fitting within quantile g-computationcoxmsm_fit
Glance at a qgcompfit objectglance.qgcompfit
Hypothesis testing about a joint effect of exposures on a multinomial outcomehomogeneity_test homogeneity_test.qgcompmultfit
Secondary prediction method for the (hurdle) qgcomp MSM.hurdlemsm_fit
Control of fitting parameters for zero inflated MSMshurdlemsm_fit.control
Hypothesis testing about a joint effect of exposures on a multinomial outcomejoint_test joint_test.qgcompmultfit
Well water datametals
Imputation for limits of detection problemsmice.impute.leftcenslognorm mice.impute.tobit
Estimating qgcomp regression line confidence boundsmodelbound.boot
Estimating qgcomp regression line confidence boundsmodelbound.ee
Fitting marginal structural model (MSM) within quantile g-computationmsm_fit
Fitting marginal structural model (MSM) within quantile g-computationmsm_multinomial_fit
Secondary prediction method for the (non-survival) qgcomp MSM.msm.predict
Default plotting method for a qgcompfit objectplot.qgcompfit plot.qgcompmultfit
Estimating pointwise comparisons for qgcomp.glm.boot objectspointwisebound.boot
Estimating pointwise comparisons for qgcomp.glm.noboot objectspointwisebound.noboot
Default prediction method for a qgcompfit object (non-survival outcomes only)predict.qgcompfit
Default printing method for a qgcompfit objectprint.qgcompfit
Default printing method for a qgcomppartialavg objectprint.qgcomppartialavg
Default printing method for a qgcomppartialavg objectprint.qgcomppartialavg_boot
Quantile g-computation for continuous, binary, count, and censored survival outcomesqgcomp
Quantile g-computation for survival outcomes in a case-cohort design under linearity/additivityqgcomp.cch.noboot
Quantile g-computation for survival outcomesqgcomp.cox.boot
Quantile g-computation for survival outcomes under linearity/additivityqgcomp.cox.noboot
Quantile g-computation for continuous and binary outcomesqgcomp.boot qgcomp.glm.boot
Quantile g-computation for continuous and binary outcomesqgcomp.ee qgcomp.glm.ee
Quantile g-computation for continuous, binary, and count outcomes under linearity/additivityqgcomp.glm.noboot qgcomp.noboot
Quantile g-computation for hurdle count outcomesqgcomp.hurdle.boot
Quantile g-computation for hurdle count outcomes under linearity/additivityqgcomp.hurdle.noboot
Quantile g-computation for multinomial outcomesqgcomp.multinomial.boot
Quantile g-computation for multinomial outcomesqgcomp.multinomial.noboot
Partial effect sizes, confidence intervals, hypothesis testsqgcomp.partials
Survival curve data from a qgcomp survival fitqgcomp.survcurve.boot
Quantile g-computation for left-censored outcomesqgcomp.tobit.noboot
Quantile g-computation for zero-inflated count outcomesqgcomp.zi.boot
Quantile g-computation for zero-inflated count outcomes under linearity/additivityqgcomp.zi.noboot
Quantizing exposure dataquantize
Calculate standard error of weighted linear combination of random variablesse_comb
Simulate quantized exposures for testing methodssimdata_quantized
Perform sample splittingsplit_data
Summarize gcompmultfit objectsummary.qgcompmultfit
Tidy method for qgcompfit objecttidy.qgcompfit
Calculate covariance matrix between one random variable and a linear combination of random variablesvc_comb
Secondary prediction method for the (zero-inflated) qgcomp MSM.zimsm_fit
Control of fitting parameters for zero inflated MSMszimsm_fit.control