multibias
R Package for Multi-Bias Analysis in Causal Inference
Science Score: 49.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 5 DOI reference(s) in README -
✓Academic publication links
Links to: springer.com -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (18.5%) to scientific vocabulary
Keywords
causal-inference
causal-models
epidemiology
r
Last synced: 8 months ago
·
JSON representation
Repository
R Package for Multi-Bias Analysis in Causal Inference
Basic Info
- Host: GitHub
- Owner: pcbrendel
- License: other
- Language: R
- Default Branch: master
- Homepage: http://www.paulbrendel.com/multibias/
- Size: 10.2 MB
Statistics
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 17
Topics
causal-inference
causal-models
epidemiology
r
Created over 7 years ago
· Last pushed 11 months ago
Metadata Files
Readme
Changelog
License
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# multibias
[](https://github.com/pcbrendel/multibias/actions/workflows/R-CMD-check.yaml)
[](https://cran.r-project.org/package=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 does not equal the causal estimate of effect:
$$(P(Y=1|X=1,C=0) / P(Y=1|X=0,C=0)) \neq (P(Y^{X=1}=1) / P(Y^{X=0}=1))$$
The `multibias_adjust()` function outputs odds ratio estimates adjusted for any combination of: uncontrolled confounding (**uc**), exposure misclassification (**em**), outcome misclassification (**om**), and selection bias (**sel**).
The package also includes several dataframes that are useful for validating the bias adjustment methods. Each dataframe contains different combinations of bias as identified by the same prefixing system. 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`).
## Installation
``` r
# install from CRAN
install.packages("multibias")
# install from github using devtools
# library("devtools")
devtools::install_github("pcbrendel/multibias")
```
## Getting started
1. Represent the observed causal data as a `data_observed` object. Here you
provide the data, specify the key variables, and list the biases present in
the data. See list below for the different bias combinations that multibias
can handle.
2. Obtain one of the two sources for bias adjustment:
1. Bias parameters - via the `bias_params` object. Values for these
parameters could come from the literature, validation data, or expert
opinion. Each parameter can be represented as a single value or as a
probability distribution. See the `bias_params` documentation for the
full bias models.
2. Validation dataframe - via the `data_validation` object. The purpose of
validation data is to use an external data source to transport the necessary
causal relationships that are missing in the observed data.
3. Run `multibias_adjust()` using the above inputs to obtain the bias-adjusted
exposure-outcome odds ratio and confidence interval.
4. Visualize a Forest Plot of the observed effect estimate against various
bias-adjusted estimates via `multibias_plot()`.
### Possible bias adjustments
**Single Bias**
* exposure misclassification
* outcome misclassification
* selection bias
* uncontrolled confounding
**Multiple Biases**
* exposure misclassification & selection bias
* exposure misclassification & outcome misclassification
* outcome misclassification & selection bias
* uncontrolled confounding & exposure misclassificaiton
* uncontrolled confounding & outcome misclassification
* uncontrolled confounding & selection bias
* uncontrolled confounding, exposure misclassification, & selection bias
* uncontrolled confounding, outcome misclassification, & selection bias
## Resources
* 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. [https://doi.org/10.1093/ije/dyad001](https://doi.org/10.1093/ije/dyad001)
* [Applying Quantitative Bias Analysis to Epidemiologic Data](https://link.springer.com/book/10.1007/978-0-387-87959-8)
Owner
- Name: Paul Brendel
- Login: pcbrendel
- Kind: user
- Location: Pittsburgh
- Repositories: 1
- Profile: https://github.com/pcbrendel
GitHub Events
Total
- Release event: 7
- Watch event: 2
- Delete event: 6
- Push event: 76
- Pull request event: 16
- Create event: 12
Last Year
- Release event: 7
- Watch event: 2
- Delete event: 6
- Push event: 76
- Pull request event: 16
- Create event: 12
Issues and Pull Requests
Last synced: 8 months ago
All Time
- Total issues: 0
- Total pull requests: 7
- Average time to close issues: N/A
- Average time to close pull requests: 42 minutes
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 7
- Average time to close issues: N/A
- Average time to close pull requests: 42 minutes
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- pcbrendel (1)
Pull Request Authors
- pcbrendel (13)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 513 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 17
- Total maintainers: 1
cran.r-project.org: multibias
Multiple Bias Analysis in Causal Inference
- Homepage: https://github.com/pcbrendel/multibias
- Documentation: http://cran.r-project.org/web/packages/multibias/multibias.pdf
- License: MIT + file LICENSE
-
Latest release: 1.7.2
published 11 months ago
Rankings
Forks count: 27.8%
Dependent packages count: 28.7%
Stargazers count: 34.5%
Dependent repos count: 36.8%
Average: 41.2%
Downloads: 78.4%
Maintainers (1)
Last synced:
9 months ago
Dependencies
DESCRIPTION
cran
- dplyr * imports
- magrittr * imports
- testthat * suggests