confoundr

INTRODUCTION

This software implements three diagnostics for confounding/selection-bias that can be used in sequence. 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).

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 Rfunctions_1_0_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