While data from randomized experiments remain the gold standard for causal inference, estimation of causal estimands from observational data is possible through various confounding adjustment methods. However, the challenge of unmeasured confounding remains a concern in causal inference, where failure to account for unmeasured confounders can lead to biased estimates of causal estimands. Sensitivity analysis within the framework of causal inference can help adjust for possible unmeasured confounding. In `causens`, three main methods are implemented: adjustment via sensitivity functions (Brumback, HernĂ¡n, Haneuse, and Robins (2004)
Why is it that more shark attacks occur when more ice cream is sold? The answer: both are related to the weather, here an unmeasured confounder.
{causens} is an R package that will allow to perform various sensitivity
analysis methods to adjust for unmeasured confounding within the context of
causal inference. Currently, we provide the following methods:
install.packages("devtools")
library(devtools)
devtools::install_github("Kuan-Liu-Lab/causens")
library(causens)
library(causens)
# Simulate data
data <- simulate_data(N = 10000, seed = 123, alpha_uz = 1,
beta_uy = 1, treatment_effects = 1)
# Treatment model is incorrect since U is "missing"
causens_sf(Z ~ X.1 + X.2 + X.3, "Y", data = data, c1 = 0.25, c0 = 0.25)$estimated_ate
Please cite our software using:
@Manual{,
title = {causens: Perform Causal Sensitivity Analyses Using Various Statistical Methods},
author = {Larry Dong and Yushu Zou and Kuan Liu},
year = {2024},
note = {R package version 0.0.3, https://github.com/Kuan-Liu-Lab/causens},
url = {https://kuan-liu-lab.github.io/causens/},
}
Please report bugs by opening an
issue. If you have
a question regarding the usage of causens, please open a
discussion.
If you would like to contribute to the package, please open a pull request.