SelectionBias: An R Package for Bounding Selection Bias in Causal Estimands
Selection bias may arise when there are dropouts or missing data in the analysis, or when subjects are included or excluded in the analysis based upon some selection criteria for the study population. Selection bias can jeopardize the validity of the study and a sensitivity analysis for assessing the effect of the selection is desired. Recently, there has been a surge of results for selection bias in causal inference, with several suggestions for sensitivity analyses. One method is to construct bounds for the bias. Here, we present the R package SelectionBias that can be used to calculate previously proposed bounds for selection bias for the causal risk ratio and causal risk difference for both the total and the selected populations. The first bound, derived by Smith and VanderWeele (SV), is based on values of sensitivity parameters that describe parts of the joint distribution of the outcome, treatment, selection indicator and unobserved variables. The second bound is an improved sharp bound that uses the same sensitivity parameters as the SV bound. The third bound is based solely on the observed data, and is therefore referred to as the assumption-free (AF) bound. The fourth and fifth bounds, the generalized assumption-free (GAF) and counterfactual assumption-free (CAF) bounds, utilize both the data and sensitivity parameters. The R package is illustrated with a simulated dataset that emulates a study where the effect of the zika virus on microcephaly in Brazil is investigated. Lastly, its performance and features are compared to the already existing R package EValue, highlighting situations where the two packages provide distinct advantages over each other.
Authors
- Ingeborg Waernbaum (ORCID: https://orcid.org/0000-0002-4457-5311)
- Stina Zetterstrom (ORCID: https://orcid.org/0000-0003-0730-9425)
Institutions
- Uppsala University (SE)
Publication Details
- Journal
- The R Journal
- Published
- 2026-09-30
- DOI
- https://doi.org/10.32614/rj-2026-049
- Primary Topic
- Advanced Causal Inference Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00