confoundr

Diagnostics for confounding of time-varying and other joint exposures

https://github.com/jwjackson/confoundr

Science Score: 20.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: pubmed.ncbi, ncbi.nlm.nih.gov
  • Committers with academic emails
    3 of 5 committers (60.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (6.6%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

Diagnostics for confounding of time-varying and other joint exposures

Basic Info
  • Host: GitHub
  • Owner: jwjackson
  • Language: R
  • Default Branch: master
  • Homepage:
  • Size: 14 MB
Statistics
  • Stars: 10
  • Watchers: 4
  • Forks: 3
  • Open Issues: 2
  • Releases: 0
Created about 10 years ago · Last pushed over 3 years ago
Metadata Files
Readme

README.md

confoundr

INTRODUCTION

This software implements three diagnostics for confounding/selection-bias that can be used in sequence, as explained in these papers and a recent tutorial paper. Built upon the framework of sequential exchangeability, these apply to any study of multivariate exposures e.g. time-varying exposures, direct effects, interaction, and censoring. The first two diagnostics pertain to the nature of confounding/selection-bias in the data, while the third is meant to examine residual confounding/selection-bias after applying certain adjustment methods. These tools are meant to help describe confounding/selection-bias in complex data after investigators have selected covariates to adjust for (e.g., through subject-matter knowledge).

  • Diagnostic 1 is a generalization of a "Table 1" for multivariate exposures (i.e. multiple exposures that are distinct in timing or character). It examines whether the prior covariate means are the same across exposure groups, among persons who have followed a particular exposure trajectory up to that point in time. Like a "Table 1" it is meant to describe whether exposure groups have different distributions of prior covariates.

  • Diagnostic 2 assesses whether there is feedback between exposures and confounders over time. If present, it indicates the use of g-methods to control for time-varying confounding for any definition of time-varying exposure that is explicitly or implicitly multivariate (e.g., ever use at time t). The diagnostic examines whether the covariate mean differs across prior exposure groups, after adjustment for covariates (that precede the exposure) through inverse probability weighting or propensity score stratification.

  • Diagnostic 3 is meant to be applied after investigators have applied the earlier diagnostics and have chosen to use g-methods to adjust for confounding/selection-bias. The form of Diagnostic 3 is similar to that of Diagnostic 1 in that it is a generalized "Table 1" for weighted or stratified data. It can be applied to examine residual confounding/selection-bias when inverse probability weights are used to fit marginal structural models. It can also be applied to examine residual confounding/selection-bias when propensity-score stratification is used to implement the parametric g-formula or marginal mean weighting through stratification.

CAPABILITIES

The tools can accommodate: * Multivariate exposures that are binary or categorical (and continuous, when used in concert with modeling). * Varying temporal depth of covariate history. * Unbalanced, sparse data with irregular measurement of exposures/covariates or missing data * Artificial censoring rules. * Requests for tables/plots at all times, specific times, or averages over selected dimensions of person-time. * Data that are not time-indexed. * Data that are supplied in "wide" or "long" format (e.g., from the twang and CBPS packages).

To install the package from CRAN use the following code:

install.packages("confoundr",dependencies=TRUE) To install the development version, use the following code:

install.packages("devtools",dependencies=TRUE) library(devtools) install_github("jwjackson/confoundr", dependencies=c("Depends","Imports"), build = TRUE, build_opts = c("--no-resave-data","--no-manual")) To load the package, use the following code:

library(confoundr)

The package contains the documentation and two vignettes.

For a cursory example with toy data, see:

vignette("quickdemo")

For a more involved example with simulated data based on a clinical trial, see:

vignette("selectionbias")

If you wish to use the functions directly, download the file Rfunctions10_2.r' in the R directory.

A PDF manual can be found in the INST directory.

For questions please contact me.

John W. Jackson, ScD Assistant Professor Department of Epidemiology Johns Hopkins Bloomberg School of Public Health

Owner

  • Login: jwjackson
  • Kind: user

GitHub Events

Total
Last Year

Committers

Last synced: over 3 years ago

All Time
  • Total Commits: 104
  • Total Committers: 5
  • Avg Commits per committer: 20.8
  • Development Distribution Score (DDS): 0.212
Top Committers
Name Email Commits
jwjackson j****n@m****u 82
eschnell e****r@g****m 17
Ting-Hsuan Chang t****0@j****u 2
Erin Schnellinger e****9@m****u 2
muschellij2 m****2@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: almost 3 years ago

All Time
  • Total issues: 0
  • Total pull requests: 3
  • Average time to close issues: N/A
  • Average time to close pull requests: 2 minutes
  • Total issue authors: 0
  • Total pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • muschellij2 (2)
  • lionel- (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total docker downloads: 21,613
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
  • Total maintainers: 1
cran.r-project.org: confoundr

Diagnostics for Confounding of Time-Varying and Other Joint Exposures

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Docker Downloads: 21,613
Rankings
Forks count: 14.9%
Stargazers count: 17.0%
Average: 24.3%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Maintainers (1)
Last synced: over 2 years ago

Dependencies

DESCRIPTION cran
  • R >= 3.1.0 depends
  • Rmpfr >= 0.7 imports
  • dplyr >= 0.7.5 imports
  • ggplot2 >= 2.2.1 imports
  • grid * imports
  • gridExtra >= 2.3 imports
  • magrittr >= 1.5 imports
  • purrr >= 0.2.5 imports
  • rlang >= 0.2.1 imports
  • scales >= 0.5.0 imports
  • stats * imports
  • stringr >= 1.3.1 imports
  • tidyr >= 0.8.1 imports
  • broom >= 0.4.4 suggests
  • covr * suggests
  • knitr * suggests
  • rmarkdown * suggests
  • testthat * suggests