Learn R Programming

⚠️There's a newer version (1.7.2) of this package.Take me there.

multibias

Overview

The multibias package is used to adjust for multiple biases in causal inference when working with observational data. Bias here refers to the case when the associational estimate of effect (e.g., $P(Y=1|X=1,C=0) / P(Y=1|X=0,C=0)$) does not equal the causal estimate of effect (e.g., $P(Y^{X=1}=1) / P(Y^{X=0}=1)$). The underlying methods are explained in the article:

Brendel PB, Torres AZ, Arah OA, Simultaneous adjustment of uncontrolled confounding, selection bias and misclassification in multiple-bias modelling, International Journal of Epidemiology, Volume 52, Issue 4, Pages 1220–1230

The functions provide odds ratio estimates adjusted for any combination of: uncontrolled confounding (uc), exposure misclassification (em), outcome misclassification (om), and selection bias (sel).

Single bias adjustments:

FunctionAdjusts for
adjust_em()exposure misclassification
adjust_om()outcome misclassification
adjust_sel()selection bias
adjust_uc()uncontrolled confounding

Multiple bias adjustments:

FunctionAdjusts for
adjust_em_sel()exposure misclassification & selection bias
adjust_em_omexposure misclassification & outcome misclassification
adjust_om_sel()outcome misclassification & selection bias
adjust_uc_em()uncontrolled confounding & exposure misclassificaiton
adjust_uc_om()uncontrolled confounding & outcome misclassification
adjust_uc_sel()uncontrolled confounding & selection bias
adjust_uc_em_sel()uncontrolled confounding, exposure misclassification, & selection bias
adjust_uc_om_sel()uncontrolled confounding, outcome misclassification, & selection bias

The package also includes several dataframes that are useful for demonstrating and validating the bias adjustment methods. Each dataframe contains different combinations of bias as identified by the same prefixing system (e.g., uc for uncontrolled confounding). For each bias combination, there is a dataframe with incomplete information (as would be encountered in the real world) (e.g., df_uc) and a dataframe with complete information that was used to derive the biased data (e.g., df_uc_source).

If you are new to bias analysis, check out Applying Quantitative Bias Analysis to Epidemiologic Data or visit my website. For examples, see the vignette.

Installation

# install from CRAN
install.packages("multibias")

# install from github using devtools
# library("devtools")
devtools::install_github("pcbrendel/multibias")

How it works

  1. Determine the desired biases to adjust for in your observational data for a given exposure-outcome effect and identify the corresponding adjust function.
  2. Obtain the necessary bias parameters (see function documentation) for bias adjustment. These values could come from the literature, validation data, or expert opinion. Each parameter can be represented as a single value or as a probability distribution.
  3. Run the adjust function after inputting:
    1. The observational data
    2. Column names of the exposure, outcome, and measured confounders
    3. The bias parameters
    4. Level for outupt confidence interval
  4. The adjust function will output the bias-adjusted exposure-outcome odds ratio and confidence interval.

Copy Link

Version

Install

install.packages('multibias')

Monthly Downloads

376

Version

1.5.3

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Paul Brendel

Last Published

September 22nd, 2024

Functions in multibias (1.5.3)

adjust_omc

Adust for outcome misclassification.
adjust_uc_emc

Adust for uncontrolled confounding and exposure misclassification.
adjust_uc_emc_sel

Adust for uncontrolled confounding, exposure misclassification, and selection bias.
adjust_om

Adust for outcome misclassification.
adjust_sel

Adust for selection bias.
adjust_om_sel

Adust for outcome misclassification and selection bias.
adjust_uc

Adust for uncontrolled confounding.
adjust_uc_sel

Adust for uncontrolled confounding and selection bias.
adjust_uc_em

Adust for uncontrolled confounding and exposure misclassification.
adjust_uc_em_sel

Adust for uncontrolled confounding, exposure misclassification, and selection bias.
df_om_source

Data source for df_om
adjust_uc_omc

Adust for uncontrolled confounding and outcome misclassification.
df_em_om

Simulated data with exposure misclassification and outcome misclassification
df_em_source

Data source for df_em
df_em_sel_source

Data source for df_em_sel
adjust_emc_omc

Adust for exposure misclassification and outcome misclassification.
df_em

Simulated data with exposure misclassification
adjust_emc_sel

Adust for exposure misclassification and selection bias.
df_em_sel

Simulated data with exposure misclassification and selection bias
df_em_om_source

Data source for df_em_om
adjust_uc_omc_sel

Adust for uncontrolled confounding, outcome misclassification, and selection bias.
adjust_em

Adust for exposure misclassification.
evans

Evans County dataset
df_uc_om

Simulated data with uncontrolled confounding and outcome misclassification
adjust_em_om

Adust for exposure misclassification and outcome misclassification.
df_uc_source

Data source for df_uc
df_uc_om_sel

Simulated data with uncontrolled confounding, outcome misclassification, and selection bias
adjust_uc_om

Adust for uncontrolled confounding and outcome misclassification.
adjust_uc_om_sel

Adust for uncontrolled confounding, outcome misclassification, and selection bias.
df_uc_em

Simulated data with uncontrolled confounding and exposure misclassification
df_uc_em_sel

Simulated data with uncontrolled confounding, exposure misclassification, and selection bias
df_uc_em_sel_source

Data source for df_uc_em_sel
df_sel

Simulated data with selection bias
df_uc_om_sel_source

Data source for df_uc_om_sel
df_uc_om_source

Data source for df_uc_om
adjust_em_sel

Adust for exposure misclassification and selection bias.
df_om

Simulated data with outcome misclassification
df_uc_sel_source

Data source for df_uc_sel
df_om_sel

Simulated data with outcome misclassification and selection bias
df_uc

Simulated data with uncontrolled confounding
df_uc_sel

Simulated data with uncontrolled confounding and selection bias
df_sel_source

Data source for df_sel
adjust_emc

Adust for exposure misclassification.
df_om_sel_source

Data source for df_om_sel
df_uc_em_source

Data source for df_uc_em
multibias-package

multibias: Simultaneous Multi-Bias Adjustment
adjust_omc_sel

Adust for outcome misclassification and selection bias.