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).


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:


To install the development version, use the following code:

               build = TRUE, 
               build_opts = c("--no-resave-data","--no-manual"))

To load the package, use the following code:


The package contains the documentation and two vignettes.

For a cursory example with toy data, see:


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


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